Reputation: 812
F:\reactjs\project-1>create-react-app hello-world
Creating a new React app in F:\reactjs\project-1\hello-world.
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 '...dir-recursive":"^0.1.'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-01-25T17_55_33_855Z-debug.log
Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.
Deleting generated file... package.json
Deleting hello-world / from F:\reactjs\project-1
Done.
my npm version is-5.6.0
Upvotes: 0
Views: 93
Reputation: 778
It defo looks like a PATH VARIABLE issue and also npm issue. I'd suggest either uninstall the Node from your machine and get the latest one up and running, OR downgrade your npm to version 4. There is one more way to do this: Find the create-react-app folder in your npm modules folder , and copy the path , and paste it directly in your Advanced Environment Variable Path. Yeah do it manually. That might solve the issue.
Upvotes: 1