0

I'm trying to install create-react-app but It does not work

$ npm install create-react-app
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/create-react-app failed, reason: connect ECONNREFUSED 127.0.0.1:8080
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR!     at ClientRequest.emit (events.js:315:20)
npm ERR!     at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:101:9)
npm ERR!     at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:123:5)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR!  FetchError: request to https://registry.npmjs.org/create-react-app failed, reason: connect ECONNREFUSED 127.0.0.1:8080
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR!     at ClientRequest.emit (events.js:315:20)
npm ERR!     at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:101:9)
npm ERR!     at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:123:5)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:97:5) {
npm ERR!   type: 'system',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   code: 'ECONNREFUSED'
npm ERR! }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\LENOVO\AppData\Roaming\npm-cache\_logs\2020-08-30T19_12_06_047Z-debug.log


I'm getting this error. I tried npm cache clean --force but nothing happened

When I try to use npm init react-app my-app I git this error

$ npm init react-app my-app

Creating a new React app in C:\Users\LENOVO\Desktop\WebDev\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 ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to https://registry.npmjs.org/cra-template failed, reason: connect ECONNREFUSED 127.0.0.1:8080
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR!     at ClientRequest.emit (events.js:315:20)
npm ERR!     at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:101:9)
npm ERR!     at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:123:5)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:97:5)
npm ERR!  FetchError: request to https://registry.npmjs.org/cra-template failed, reason: connect ECONNREFUSED 127.0.0.1:8080
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:68:14)
npm ERR!     at ClientRequest.emit (events.js:315:20)
npm ERR!     at onerror (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:101:9)
npm ERR!     at callbackError (C:\Program Files\nodejs\node_modules\npm\node_modules\agent-base\index.js:123:5)
npm ERR!     at processTicksAndRejections (internal/process/task_queues.js:97:5) {
npm ERR!   type: 'system',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   code: 'ECONNREFUSED'
npm ERR! }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\LENOVO\AppData\Roaming\npm-cache\_logs\2020-08-30T19_37_47_138Z-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 C:\Users\LENOVO\Desktop\WebDev\React
Done.

please, anyone, help.

0

1 Answer 1

3

Create React App using the following commands;

npx create-react-app my-app


npm init react-app my-app

yarn create react-app my-app

Create React App

Try this to fix your proxy

npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/
Sign up to request clarification or add additional context in comments.

1 Comment

You seem to be behind a proxy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.