I'm using Ubuntu 20.04. I've been trying to run create react app using npx for over 2 days switching to different Wifis + Ethernet but I get Invalid json response body at https://registry.npmjs.org/loose-envify all the time.
I thought it was an internet speed connection problem but it wasn't
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/loose-envify reason: Unexpected end of JSON input
npm ERR! A complete log of this run can be found in:
npm ERR! /home/deestarks/.npm/_logs/2021-04-12T18_55_27_266Z-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
package.jsonfile? Or is that the issue, it has an error and then gets deleted? What command are you running to create this new React project? - Drew Reesepackage.json. It gets deleted when the error occurs. And I issue the command withnpx create-react-app appname- DeeStarks/home/deestarks/.npm/_logs/2021-04-12T18_55_27_266Z-debug.log? Do you have the required versions of Node/npm installed: create-react-app.dev/docs/getting-started#creating-an-app. - Drew Reese