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

Force install of devDependencies #182

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

Conversation

elledienne
Copy link

@elledienne elledienne commented Oct 19, 2017

The idea of the buildpack is to install devDependencies even if the NODE_ENV is set to production simply avoiding the flag --production on npm install.

Unfortunately this doesn't work since npm never installs devDependencies if the environment is set to production. Official documentation states:

With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies. (link)

To fix that we can run npm install as development.

The idea of the buildpack is to install `devDependencies` even if the `NODE_ENV` is set to `production` simply avoiding the flag
`--production` on `npm install`.

Unfortunately this doesn't work since npm never installs `devDependencies` if the environment is set to `production`. To fix that we can run npm install as `development`
@elledienne
Copy link
Author

Any news on this one? @yourcelf

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.

2 participants