NETFLEXX joseph
NETFLEXX joseph

Reputation: 117

unexpected end of json in react instillation

I get this message when ever i try to run create-react-app

$ npx create-react-app starbezz

Creating a new React app in C:\Users\HP PC\starbezz.

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 '...42c04e1d54065e47e883b'

npm ERR! A complete log of this run can be found in: npm ERR!     C:\Users\HP PC\AppData\Roaming\npm-cache\_logs\2019-04-19T12_24_21_614Z-debug.log

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

Deleting generated file... package.json Deleting starbezz/ from C:\Users\HP PC Done.

Upvotes: 2

Views: 54

Answers (1)

WaLid LamRaoui
WaLid LamRaoui

Reputation: 2465

try to clean npm cache :

npm cache clean --force

then : npx create-react-app starbezz

Also, always update npm to the latest version :

npm i npm@latest -g

Upvotes: 1

Related Questions