0

I am trying to install packages using npm, but they are not getting downloaded and are stuck in the process. Here is the snippet with --verbose:

ankur@ankurkh1:/media/ankur/DATA/Web Development/mongoose-test$ npm install mongoose --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'mongoose', '--verbose' ]
npm info using npm@6.14.8
npm info using node@v12.18.2
npm verb npm-session ff57c7739070981a
[..................] / rollbackFailedOptional: verb npm-session ff57c7739070981a

after a very long time, I got this:

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/mongoose failed, reason: connect ETIMEDOUT 104.16.24.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm http fetch GET 200 https://registry.npmjs.org/mongoose 461888ms (from cache)
npm timing stage:loadCurrentTree Completed in 462049ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 2ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 8ms
[..................] / fetchMetadata: sill resolveWithNewModule mongoose@5.12.10 checking installa

I have already tried solutions from npm install hangs, they are not working. I am not using any proxy.

I am using Ubuntu 20.10

1 Answers1

0

This https://stackoverflow.com/a/65822052/16049104 helped me resolve this issue. But I am still unclear about why this happened. If someone can provide a detailed explanation, it would be great.