Local npm cache #138

Closed
vvo opened this Issue Sep 10, 2012 · 6 comments

Projects

None yet

4 participants

@vvo
vvo commented Sep 10, 2012

Hello.

Shouldn't we have a separate npm cache folder for each node version?

So that packages caches won't step on each other.

@creationix
Owner

nvm is nothing more than a bash script that auto-configures node with a custom prefix and messes with your path. Where does npm store it's cache? If it's relative to the node install then it's separate.

@vvo
vvo commented Sep 10, 2012

It is located in ~/.npm so shared accross nodejs versions that nvm installed.

@creationix
Owner

I see. Though I'm not sure there is much value in not sharing the cache. It's all coming from the same npm repository. I guess if the cache format changed in some backwards incompatible way, then it could be dangerous. Still this seems outside the scope of nvm. I don't mess with how node or npm work. Just provide an easy way to install several versions and switch between them. Maybe there is some NPM_* environment variable we could set to move the cache to inside the local install?

@ljharb
Collaborator
ljharb commented Feb 16, 2014

Do any packages vary by node version? If not, let's close this.

@vvo
vvo commented Feb 16, 2014

only the builded packages can vary I guess. No big deal here I think.

@vvo vvo closed this Feb 16, 2014
@denzuko
denzuko commented Apr 25, 2016

Honestly any user can do nvm use <version> && npm config set cache .cache/node-<version> to resolve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment