Npm does not install cache tarball

I use Node v5.0.0 and npm v3.3.6 and encounter a very isolated problem when it is tar . Due to corporate firewalls, I was forced to clone the Git repository and install it from this

My problem is that although npm is for installing packages from the cache, tar is the only package that insists on downloading it from the npm registry.

 $ npm install tar@2.2.1 --verbose --cache-min=999999999999 npm info it worked if it ends with ok npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe', npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', npm verb cli 'install', npm verb cli ' tar@2.2.1 ', npm verb cli '--verbose', npm verb cli '--cache-min=999999999999' ] npm info using npm@3.3.6 npm info using node@v5.0.0 npm verb get http://registry.npmjs.org/tar not expired, no request npm verb cache add spec tar@2.2.1 npm verb addNamed "2.2.1" is a plain semver version for tar npm verb addNameVersion registry:http://registry.npmjs.org/tar not in flight; fetching npm verb get http://registry.npmjs.org/tar not expired, no request npm verb addRemoteTarball http://registry.npmjs.org/tar/-/tar-2.2.1.tgz not in flight; adding npm verb addRemoteTarball [ 'http://registry.npmjs.org/tar/-/tar-2.2.1.tgz', npm verb addRemoteTarball '8e4d2a256c0e2185c6b18ad694aec968b83cb1d1' ] npm info retry fetch attempt 1 at 8:38:23 AM npm info attempt registry request try #1 at 8:38:23 AM npm http fetch GET http://registry.npmjs.org/tar/-/tar-2.2.1.tgz npm verb request id b8672d43f7b2c569 npm http fetch 503 http://registry.npmjs.org/tar/-/tar-2.2.1.tgz npm info retry will retry, error on last attempt: Error: server error 503 

I double checked my cache and see that tar v2.2.1 is actually present and working.

 $ npm cache list | grep 'tar\\2.2.1' ~\AppData\Roaming\npm-cache\tar\2.2.1 ~\AppData\Roaming\npm-cache\tar\2.2.1\package ~\AppData\Roaming\npm-cache\tar\2.2.1\package.tgz ~\AppData\Roaming\npm-cache\tar\2.2.1\package\package.json 

Why can I solve this problem by simply adding the Git project repository to the dependencies folder and using npm install deps/node-tar before doing npm install . However, this does not explain the problem.

+5
source share

Source: https://habr.com/ru/post/1236433/


All Articles