0
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

2
  • What's your OS, Node version and create-react-app version ? Commented Jan 25, 2018 at 18:58
  • os:- windows10, node:-8.9.4 Commented Jan 25, 2018 at 19:06

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.