Reputation: 3
D:\React>create-react-app secondapp
Creating a new React app in D:\React\secondapp.
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 '...2.2","is-glob":"^4.0.'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Divyansh Chaudhary\AppData\Roaming\npm-cache\_logs\2020-08-26T08_41_16_573Z-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 secondapp/ from D:\React
Done.
D:\React>
Upvotes: 0
Views: 60
Reputation: 1430
With the newer versions of npm (version 5.2 and higher), you are recommended to use npx
to use create-react-app instead. According to the create-react-app github, you are advised to
npm uninstall -g create-react-app
npm cache verify
npx create-react-app my-app
cd my-app
npm start
Upvotes: 0