Hello Experts,
I am trying to install node packages on my windows machine using npm from a fresh install of node.
however, I am getting ETIMEDOUT errors. I checked few other stackoverflow questions with similar problem and almost all of them are related to problems when behind a proxy. Same is not the case with me. My system is not behind any proxy server. Can someone help me with resolving it.
I ran the below highlighted commands and it doesn't work, Please suggest me resolve the issue.
PS C:\Users\D6565\Sri\PCFControls\DemoPCF> npm install
npm ERR! code ETIMEDOUT
npm ERR! syscall connect Searching for availanpm ERR! errno ETIMEDOUT re \\nfcu.net\user\honpm ERR! network request to http://registry.npmjs.org/@microsoft%2feslint-plugin-power-apps failed, reason: connect ETIMEDOUT 10.137.140.57:49467
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: C:\Users\D6565\AppData\Local\npm-cache\_logs\2024-03-24T22_32_43_233Z-debug-0.log
PS C:\Users\D5551\Sri\PCFControls\DemoPCF> npm config delete proxy
PS C:\Users\D5551\Sri\PCFControls\DemoPCF> npm config delete http-proxy
PS C:\Users\D5551\Sri\PCFControls\DemoPCF> npm config delete https-proxy
PS C:\Users\D5551\Sri\PCFControls\DemoPCF> npm cache clean --force
npm WARN using --force Recommended protections disabled.
PS C:\Users\D5551\Sri\PCFControls\DemoPCF> npm install
Terminate batch job (Y/N)? Y
PS C:\Users\D5551\Sri\PCFControls\DemoPCF> npm config set registry http://registry.npmjs.org
PS C:\Users\D5551\Sri\PCFControls\DemoPCF> npm -g install npm
npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/npm failed, reason: connect ECONNREFUSED 104.16.0.35:80
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:517:28)
npm ERR! at _destroy (node:_http_client:882:13)
npm ERR! at onSocketNT (node:_http_client:902:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! FetchError: request to http://registry.npmjs.org/npm failed, reason: connect ECONNREFUSED 104.16.0.35:80
npm ERR! at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:517:28)
npm ERR! at _destroy (node:_http_client:882:13)
npm ERR! at onSocketNT (node:_http_client:902:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:83:21) {
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '104.16.0.35',
npm ERR! port: 80,
npm ERR! type: 'system'
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: C:\Users\D6565\AppData\Local\npm-cache\_logs\2024-03-24T23_26_17_948Z-debug-0.log
PS C:\Users\D5551\Sri\PCFControls\DemoPCF>
I am able to resolve the issue by running the below commands
npm config set proxy http://company:8080
npm config set https-proxy https://company:8080
First, You should run this command to check if any proxy is interfering:
npm config list
If so, run these:
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy
---------------------------
If the solution I provided assisted you in resolving this issue, kindly select "Accept as solution" This will help others in finding the solution more expediently 😄Also, a Thumbs up would be a great compliment!
I'm a noob at this stuff. So here's some suggestions...
Definitely not running a VPN, filtering or firewall issues (e.g would it be worth adding Node.js to the firewall authorized applications)?
Try setting the proxys to null
npm config set proxy null
npm config set https-proxy null
Have you seen this thread related to IPv6: https://github.com/npm/cli/issues/4163 some people have disabled it https://networking.grok.lsu.edu/Article.aspx?articleid=17573 some people have also tried changing/updating their version of node or even reinstalling entirely.
There's one workaround listed here that might be worth a shot: https://stackoverflow.com/questions/46624465/npm-install-is-giving-error-connect-etimedout-without-proxy
WarrenBelz
85
Most Valuable Professional
Michael E. Gernaey
59
Super User 2025 Season 1
mmbr1606
55
Super User 2025 Season 1