Error creating an application with create-React-app

Asked

Viewed 3,215 times

0

I installed the create-React-app all right, but when tried to create a project using the command create-React-app hello-world of the following error:

C:\Users\j.santos.da.silva\Desktop\curso-angular>create-react-app hello-world

Creating a new React app in C:\Users\j.santos.da.silva\Desktop\curso-angular\hello-world.

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 '...verse":"7.0.0-alpha.1'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\j.santos.da.silva\AppData\Roaming\npm-cache\_logs\2018-06-12T15_34_51_173Z-debug.log

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

Deleting generated file... package.json
Deleting hello-world / from C:\Users\j.santos.da.silva\Desktop\curso-angular
Done.

1 answer

2


Try again, it seems to be just a download problem, if it doesn’t work, try to install one dependency at a time to figure out which is wrong.

Try to clear the npm cache, sometimes you may have the same error repeatedly because the file causing the problem is cached.

npm cache clean --force

  • guy worked out, thanks saved my ass trying to make it

Browser other questions tagged

You are not signed in. Login or sign up in order to post.