You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
Im opening a new issue here as the others similar to this quite doesnt explain all the problems and hence I would like to summarize my thoughts.
Sorry if I sound silly anywhere. Im not familiar with internal NPM architecture.
When I run npm install NPM seems to check the online registry first and not the cache (I might be wrong but it sure goes to online registry). I dont really understand the need for this, if the requested version is available in the npm global cache why not use it and save the round trip? this would have avoided the whole azer npm left-pad fiasco to an extend in the first place as left-pad would have been loaded from the cache. This is how maven, gradle, bower etc does if im not wrong
If all my node_modules are upto date and if I run npm install it still goes and checks the online registry and if I'm offline NPM just hangs there (Im on windows btw)
there needs to be atleast an --offline flag that would purely install from cache and go to registry only for un available versions of a repo
If NPM could just use the cache effectively it would save a lot of install time and network cost.
Sorry if its a duplicate somehow
EDIT: I know that there is a cache-min xxxxxx stuff but its not very intuitive
Also I know if I have a semver range defined you would have to hit the registry to check but atleast for package json dependency where all the modules are declared using a full semever exact version instead of a range the registry hitting should be avoided
so for a package.json dependencies like below why should you go to registry when i run npm i ?
Im opening a new issue here as the others similar to this quite doesnt explain all the problems and hence I would like to summarize my thoughts.
Sorry if I sound silly anywhere. Im not familiar with internal NPM architecture.
npm install
NPM seems to check the online registry first and not the cache (I might be wrong but it sure goes to online registry). I dont really understand the need for this, if the requested version is available in the npm global cache why not use it and save the round trip? this would have avoided the wholeazer npm left-pad
fiasco to an extend in the first place asleft-pad
would have been loaded from the cache. This is how maven, gradle, bower etc does if im not wrongnpm install
it still goes and checks the online registry and if I'm offline NPM just hangs there (Im on windows btw)--offline
flag that would purely install from cache and go to registry only for un available versions of a repoIf NPM could just use the cache effectively it would save a lot of install time and network cost.
Sorry if its a duplicate somehow
EDIT: I know that there is a cache-min xxxxxx stuff but its not very intuitive
Also I know if I have a semver range defined you would have to hit the registry to check but atleast for package json dependency where all the modules are declared using a full semever exact version instead of a range the registry hitting should be avoided
so for a package.json dependencies like below why should you go to registry when i run
npm i
?The text was updated successfully, but these errors were encountered: