npm install being slow

I'm currently using wsl2 and for some reason npm is taking too long to install. I tested my internet speed with speedtest cli and you can see the results in the screenshot below, they seem okay. I also cleaned the npm cache npm clean cache --force used different npm version by installing different node versions via npm. I still don't know why it is being so slow. I 'll appreciate any help in debugging this
No description
8 Replies
Ganesh
GaneshOP2mo ago
when using --verbose option in npm install it gets stuck for 2 minutes on this kind of output. I can send the full log if needed
No description
Ganesh
GaneshOP2mo ago
Pastebin
0 verbose cli /home/ganesh/.nvm/versions/node/v22.20.0/bin/node /ho...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Ganesh
GaneshOP2mo ago
full log
549 http cache find-up@https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz 0ms (cache hit)
550 http fetch POST 503 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 300579ms
551 silly audit bulk request failed [object Object]
552 verbose audit error FetchError: request to https://registry.npmjs.org/-/npm/v1/security/audits/quick failed, reason: read ETIMEDOUT
552 verbose audit error at ClientRequest.<anonymous> (/home/ganesh/.nvm/versions/node/v22.20.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
552 verbose audit error at ClientRequest.emit (node:events:519:28)
552 verbose audit error at emitErrorEvent (node:_http_client:105:11)
552 verbose audit error at TLSSocket.socketErrorListener (node:_http_client:518:5)
552 verbose audit error at TLSSocket.emit (node:events:519:28)
552 verbose audit error at emitErrorNT (node:internal/streams/destroy:170:8)
552 verbose audit error at emitErrorCloseNT (node:internal/streams/destroy:129:3)
552 verbose audit error at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
552 verbose audit error code: 'ETIMEDOUT',
552 verbose audit error errno: 'ETIMEDOUT',
552 verbose audit error syscall: 'read',
552 verbose audit error type: 'system'
552 verbose audit error }
553 silly audit error undefined
554 silly audit report null
555 silly ADD node_modules/isexe
556 silly ADD node_modules/punycode
557 silly ADD node_modules/has-flag
549 http cache find-up@https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz 0ms (cache hit)
550 http fetch POST 503 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 300579ms
551 silly audit bulk request failed [object Object]
552 verbose audit error FetchError: request to https://registry.npmjs.org/-/npm/v1/security/audits/quick failed, reason: read ETIMEDOUT
552 verbose audit error at ClientRequest.<anonymous> (/home/ganesh/.nvm/versions/node/v22.20.0/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
552 verbose audit error at ClientRequest.emit (node:events:519:28)
552 verbose audit error at emitErrorEvent (node:_http_client:105:11)
552 verbose audit error at TLSSocket.socketErrorListener (node:_http_client:518:5)
552 verbose audit error at TLSSocket.emit (node:events:519:28)
552 verbose audit error at emitErrorNT (node:internal/streams/destroy:170:8)
552 verbose audit error at emitErrorCloseNT (node:internal/streams/destroy:129:3)
552 verbose audit error at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
552 verbose audit error code: 'ETIMEDOUT',
552 verbose audit error errno: 'ETIMEDOUT',
552 verbose audit error syscall: 'read',
552 verbose audit error type: 'system'
552 verbose audit error }
553 silly audit error undefined
554 silly audit report null
555 silly ADD node_modules/isexe
556 silly ADD node_modules/punycode
557 silly ADD node_modules/has-flag
this seems to be the relavent section
Jochem
Jochem2mo ago
there's apparently a massive AWS outage going on https://health.aws.amazon.com/health/status, which might be related
Ganesh
GaneshOP2mo ago
I assume that can be one of the reason for timeout error since it can't connect to it I'll try later when its fixed then see I did check npm status and it was displaying fine tho i guess they haven't detected anything
Ganesh
GaneshOP2mo ago
npm Status
Welcome to npm's home for real-time and historical data on system performance.
Ganesh
GaneshOP2mo ago
status updated showing problems now
curiousmissfox
curiousmissfox2mo ago
It affected so many of the platforms I rely on

Did you find this page helpful?