0

So... Today I installed VS Code and Node.js on office's computer. My initial idea was to code an quick app to edit some excel sheets. When I tried to install a module, the following error was returned:

npm ERR! code ECONNREFUSED 
npm ERR! syscall connect   
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/express failed, reason: connect ECONNREFUSED 104.16.25.35:80
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:110:14)
npm ERR!     at ClientRequest.emit (node:events:520:28)
PS C:\Users\fabio.cerqueira\ws-javascript\polo> npm install express
npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/express failed, reason: connect ECONNREFUSED 104.16.25.35:80
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:110:14)
npm ERR!     at ClientRequest.emit (node:events:520:28)
npm ERR!     at Socket.socketErrorListener (node:_http_client:442:9)
npm ERR!     at Socket.emit (node:events:532:35)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR!  FetchError: request to http://registry.npmjs.org/express failed, reason: connect ECONNREFUSED 104.16.25.35:80
npm ERR!     at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:110:14)
npm ERR!     at ClientRequest.emit (node:events:520:28)
npm ERR!     at Socket.socketErrorListener (node:_http_client:442:9)
npm ERR!     at Socket.emit (node:events:532:35)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR!     at 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.25.35',
npm ERR!   port: 80,
npm ERR!   type: 'system',
npm ERR!   requiredBy: '.'
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'

Any ideas to solve this?

  • "If you are behind a proxy, please make sure that the 'proxy' config is set properly." This one, I expect. What does "telnet registry.npmjs.org 80" do? – The Archetypal Paul Feb 18 '22 at 18:20
  • This is a problem of your computer when try to connect to npm registry. Please follow the steps mentioned by @TheArchetypalPaul – Jonathan Brizio Feb 19 '22 at 22:13

1 Answers1

2

I disconnected the PC from the office's network and connected on my cellphone's 4G and the npm install worked.

So maybe... Firewall blocking, I guess?