Answer the question
In order to leave comments, you need to log in
Trouble installing React for the first time?
Hello, I'm starting to learn React, and I ran into a problem installing it. The problem is this: when I enter the command
npx create-react-app my-app
, the following happens: a very long download starts, then it gives the following:
Creating a new React app in /home/sasha/my_project/react/my-app.
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/@rollup%2fplugin-replace reason: Unexpected end of JSON input
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sasha/.npm/_logs/2021-06-01T05_16_28_507Z-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 my-app/ from /home/sasha/my_project/react
Done.
sudo npx create-react-app my-app
sh: 1: create-react-app: Permission denied
Answer the question
In order to leave comments, you need to log in
sudo npx create-react-app my-app
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/@rollup%2fplugin-replace reason: Unexpected end of JSON input
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sasha/.npm/_logs/2021-06-01T05_16_28_507Z-debug.log
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question