2

I am a newbie to React and trying to start a project

npm version: 6.4.1

create-react-app version: 2.1.8

node version: 10.15.0

I run create-react-app newApp , And got error:

npm ERR! Unexpected end of JSON input while parsing near '.../openpgpjs.org\r\n\r\'

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\ThunderF\AppData\Roaming\npm-cache_logs\2019-04-> 06T18_16_37_841Z-debug.log

Aborting installation.

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

2

2 Answers 2

8

I faced the same issue but I wrote the following line and it worked.

npm cache clean --force

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

3 Comments

Actually this did not solve the issue , i don't know why , by the way thanks for your answer
Then you can go through fithub page and file an issue or consult already addressed solution.
It's a pretty strange but i reinstall react-create and run it and it worked, Thanks
1

I got the same problem and I ran these commands

1) npm cache clean --force
2) restart your machine
3) npx create-react-app my-app
(or)
npm install create-react-app enter and then npm init react-app my-app
cd my-app
npm start

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.