Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include process NODE_ENV in archive hash. #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SteffanDonal
Copy link

@SteffanDonal SteffanDonal commented Sep 29, 2016

As the packages installed (devDependencies when not on production) differ based on environment, the hash should include the process's environment.

Not doing this causes an issue with servers that have multiple environments running for one particular module. For example, I have staging and production installations of a repository on the same server, but run under different environments. If I install production before staging, the devDependencies will never be installed.

@swarajban
Copy link
Owner

Since this will invalidate existing caches, can you submit PR where this is an option to install?

Something like
npm-cache install --include-env

@SteffanDonal
Copy link
Author

I would argue that invalidating existing caches in this case is desirable (as currently they could be wrong) - especially as users of npm-cache will have to consciously upgrade to start seeing this change in hash.

@jehy
Copy link

jehy commented Apr 25, 2018

What about this pull request? I just stepped on this when found out that my devDependencies can never be installed : (

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants