Create-react-app: npm ERR! Unexpected end of JSON input while parsing near '....'

Created on 20 May 2020  Â·  4Comments  Â·  Source: facebook/create-react-app

Describe the bug

npm/npx create-react-app my-app show this error
i tried npm cache clean --force but i get the same error again and again

npm init react-app front
npx: installed 98 in 37.068s

Creating a new React app in /home/h4kst3r/Desktop/APIs/restaurant-API/front.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! Unexpected end of JSON input while parsing near '...zAJNgZjZUkJ08ybAxwNnR'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/h4kst3r/.npm/_logs/2020-05-20T20_47_49_189Z-debug.log

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

Deleting generated file... package.json
Deleting front/ from /home/h4kst3r/Desktop/APIs/restaurant-API
Done.

Environment

Environment Info:

  current version of create-react-app: 3.4.1
  running from /home/h4kst3r/.npm/_npx/5007/lib/node_modules/create-react-app

  System:
    OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz
  Binaries:
    Node: 12.16.3 - /usr/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/bin/npm
  Browsers:
    Chrome: 81.0.4044.138
    Firefox: 76.0.1
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to reproduce

  1. npm cache clean --force
  2. npm / npx create-react-app front
bug report needs triage

Most helpful comment

npm cache clean --force

alone solve the problem
Thank u

I tried cache clean , rhe problem was in the connection stability , thank you :)

All 4 comments

Thanks!

npm cache clean --force

alone solve the problem
Thank u

npm cache clean --force

alone solve the problem
Thank u

I tried cache clean , rhe problem was in the connection stability , thank you :)

Hi,

How can I help you?

Em dom., 25 de out. de 2020 às 06:45, Sandeep Kumar <
[email protected]> escreveu:

i have tried that also npm cache clean --force but it not works
help me out please ...

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/facebook/create-react-app/issues/9038#issuecomment-716119941,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOZK2ZEHGX4CTECYEF3VCGLSMPXT7ANCNFSM4NGJZJAQ
.

>

Cordialmente,
Karina Xavier

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrice727 picture adrice727  Â·  3Comments

onelson picture onelson  Â·  3Comments

alleroux picture alleroux  Â·  3Comments

Aranir picture Aranir  Â·  3Comments

fson picture fson  Â·  3Comments