npm ERR! Unexpected end of JSON input while parsing near

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 :

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 *

84 + = 92