npm ERR! errno ECONNREFUSED when I do: npm install

Discussions about using Linux guests in VirtualBox.
Post Reply
Ryofu
Posts: 1
Joined: 7. Jul 2021, 10:13

npm ERR! errno ECONNREFUSED when I do: npm install

Post by Ryofu »

Hello everyone !

I have this error when I run

Code: Select all

npm install
on my project:

Code: Select all

npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to ... failed, reason: connect ECONNREFUSED 127.0.0.1:9099
npm ERR!     at ClientRequest.<anonymous> (/home/bloup/.nvm/versions/node/v16.4.1/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:97:14)
npm ERR!     at ClientRequest.emit (node:events:394:28)
npm ERR!     at Socket.socketErrorListener (node:_..._client:447:9)
npm ERR!     at Socket.emit (node:events:406:35)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:193:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:158:3)
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR!  FetchError: request to ... failed, reason: connect ECONNREFUSED 127.0.0.1:9099
npm ERR!     at ClientRequest.<anonymous> (/home/bloup/.nvm/versions/node/v16.4.1/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:97:14)
npm ERR!     at ClientRequest.emit (node:events:394:28)
npm ERR!     at Socket.socketErrorListener (node:_..._client:447:9)
npm ERR!     at Socket.emit (node:events:406:35)
npm ERR!     at emitErrorNT (node:internal/streams/destroy:193:8)
npm ERR!     at emitErrorCloseNT (node:internal/streams/destroy:158: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: '127.0.0.1',
npm ERR!   port: 9099,
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'

But I'm not behind a proxy.
I'm on an Ubuntu VM on an Windows 8.1 host with the firewall desactivated.

Can someone help me please ?
Thank you in advance !
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: npm ERR! errno ECONNREFUSED when I do: npm install

Post by scottgus1 »

The only thing we could help on is to confirm if the Virtualbox 'hardware' is working to allow internet access.

If you can ping 8.8.8.8 from the VM terminal, then you have internet in the VM, and your VM's OS or the "npm" app needs further configuration, which you'd have to web-search how to do.
Post Reply