Create React App error

After installing the npm create-react-app
The lesson is from this codecademy lesson

create-react-app first-app

Creating a new React app in C:\Users\Ricsson Ngo\Documents\Projects\React\first-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts…

npm ERR! Unexpected end of JSON input while parsing near ‘…MLWw==",“shasum”:"ef7’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ricsson Ngo\AppData\Roaming\npm-cache_logs\2019-08-22T03_21_10_006Z-debug.log

Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.

Deleting generated file… package.json
Deleting first-app/ from C:\Users\Ricsson Ngo\Documents\Projects\React
Done.

Hello :slight_smile:

Looks like there was a problem during the download process.

Please run command npm cache clean --force and try again.

5 Likes

Dude. It works! Thanks! :laughing:

4 Likes

You’re very welcome :slight_smile:

1 Like

I too have the same problem but clearing the cache is not working and every time I run the command different type of error comes out.

C:\Users\dell>create-react-app ravenous Creating a new React app in C:\Users\dell\ravenous. Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts with cra-template…
npm ERR! Unexpected end of JSON input while parsing near ‘…t","eslint-module-uti’
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dell\AppData\Roaming\npm-cache_logs\2020-04-27T11_51_45_421Z-debug.log
Aborting installation. npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file… package.json Deleting ravenous/ from C:\Users\dell Done.

it worked for me thaaank yoouu. I used command prompt as admin.

C:\Users\Administrator\Desktop\reactApp>create-react-app my-react-app

Creating a new React app in C:\Users\Administrator\Desktop\reactApp\my-react-app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template…

core-js@2.6.11 postinstall C:\Users\Administrator\Desktop\reactApp\my-react-app\node_modules\babel-runtime\node_modules\core-js
node -e “try{require(’./postinstall’)}catch(e){}”

core-js@3.6.5 postinstall C:\Users\Administrator\Desktop\reactApp\my-react-app\node_modules\core-js
node -e “try{require(’./postinstall’)}catch(e){}”

core-js-pure@3.6.5 postinstall C:\Users\Administrator\Desktop\reactApp\my-react-app\node_modules\core-js-pure
node -e “try{require(’./postinstall’)}catch(e){}”

  • cra-template@1.0.3
  • react-scripts@3.4.1
  • react@16.13.1
  • react-dom@16.13.1
    added 1602 packages from 751 contributors and audited 1606 packages in 102.507s

61 packages are looking for funding
run npm fund for details

found 4981 low severity vulnerabilities
run npm audit fix to fix them, or npm audit for details

This is the error im encountering…how to fix it?