npm ERR! Unexpected end of JSON input while parsing near

I am creating reactjs application from this How to create reactjs application. Now i am getting this error when run reactjs application .

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 ‘…sLyxztWMCfqn4iWlEWH\n’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\xyz\AppData\Roaming\npm-cache\_logs\2018-10-19T07_32_54_051Z-debug.log

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

Solution :

Your need to clear cache of your application . you can use these command for this.

try npm cache clean –force and create-react-app my-app again.

OR

npm install -g create-react-app@latest and create-react-app my-app again.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

59 − = 58