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

Dependency installation doesn't respect NODE_ENV #846

Open
RealOrangeOne opened this issue Oct 1, 2020 · 1 comment
Open

Dependency installation doesn't respect NODE_ENV #846

RealOrangeOne opened this issue Oct 1, 2020 · 1 comment

Comments

@RealOrangeOne
Copy link

Perhaps related to #522

I've just hit an interesting bug with how npm ci is currently being used. The current setup ignores NODE_ENV=production, and explicitly uses NPM_CONFIG_PRODUCTION to drive whether devDependencies should be installed, which doesn't match how npm ci works.

I think the fix for this is to remove the explicit handling of --production during install, so it's handled explicitly by npm, and how it wants to install dependencies based on arguments. This makes sure it matches how it works in non-heroku environments, such as CI.

monitor "npm-install" npm install --production="$production" --unsafe-perm --userconfig "$build_dir/.npmrc" 2>&1

@danielleadams
Copy link
Contributor

Thanks @RealOrangeOne. I'll take a look at this.

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

No branches or pull requests

2 participants