2
votes

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
@PrakashSharma I tried it , It does not work!Abdulrahman Falyoun

2 Answers

8
votes

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

npm cache clean --force

1
votes

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