While working on Node you may be downloading various npm packages. Sometimes the download process just hung and does not move forward. You may also see errors related to non-reachable registry.npmjs.org URL.
1. Error Log
Typically error logs look like this:
E:\ngexamples\helloworld> npm install -g webpack
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz failed, reason: connect ETIMEDOUT 104.18.95.96:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network '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\Lokesh\AppData\Roaming\npm-cache\_logs\2018-06-18T16_50_17_569Z-debug.log
2. Solution
Mostly (and for me as well) this error is due to incorrect proxy settings. Verify network proxy settings are correct.
Else try removing proxy settings using the below commands and try again.
$ npm config rm proxy
$ npm config rm https-proxy
Hopefully, the above commands will solve this error for you as well.
Happy Learning !!
Thanks it worked!!! after a long time
Thanks this worked !!!
yes it worked for me
i followed the steps you are mentioned but after that getting same error plz help me
Thanks bro!!
It really works for me
Solved my problem:
Problem: fetchMetadata took too long (~30 minutes for 30kb packages)
Solution: By cleaning proxy like described above, my problem got solved.
Kind regards,
Mergim Alija
Tried everything before this, nothing worked.
This solution worked like a charm!
Thank you !
Thank you solve my problem
I tried the code above and i tried download the react App again using the code “npx create-react-app my-app” and it flagged this errror:
npm ERR! Cannot read properties of null (reading ‘pickAlgorithm’)
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Edmund Obinna\AppData\Local\npm-cache\_logs\2022-02-22T09_20_09_248Z-debug-0.log
Aborting installation.
npm install –no-audit –save –save-exact –loglevel error react react-dom react-scripts cra-template has failed.
Deleting generated file… package.json
Deleting app/ from C:\Users\Edmund Obinna
Done.
How to enter these commands
$ npm config rm proxy$ npm config rm https-proxyin CMD or in Visual Studio Code. Please tell me.You can execute these commands in both places. Make sure
npmis found inPATHvariable.I was facing same issue when i set password to my Wi-Fi the issue get resolved for me
Thanks a ton! It worked for me as well. :)
My problem was fixed !
Thank you very much :)
Thanks!! This solved my problem :)
Thanks. This resolved my problem too!
Thanks a lot!
It solve my problem!