-
Notifications
You must be signed in to change notification settings - Fork 39
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
Install dev dependencies to compile project #13
Comments
Would appreciate this as well, the official npm buildpack also has the same behavior. |
Agreed, If this were working I would continue to use it. |
Or you would like |
I provided screenshots in the post. I am not sure about how exactly this buildpack works, but it seems the way it deals with dev deps is indeed not sufficient, as you can see from logs on screenshot. |
So the issue is that while |
I would rather keep my NODE_ENV in production as I make other checks across the app with that. Heroku has a setting for NPM_CONFIG_PRODUCTION which skips the pruning process after installing all dependencies. This to me is ideal. One check to ask if we want dev dependencies installed another to prune them or not. |
I was able to fix this issue in my fork: https://github.com/TheSecurityDev/heroku-buildpack-nodejs-pnpm Basically it overrides the NODE_ENV variable when running |
Thanks a ton for your buildpack! Solved the only problem I had with my deployment setup. |
I've created a pull request #20 to fix this issue based on my fork referenced above. |
Since it has finally been merged, this issue can probably be closed now. |
@hampusborgos close this plz |
Is your enhancement request related to a problem? Please describe.
Many Node dependencies, such as TypeScript, are used as dev dependencies, meaning they are required to initially compile project, but are not required later in production. This means any project that relies on TS or other libraries to compile would fail during build time.
Describe the solution you'd like
Describe alternatives you've considered
Moving dependencies from dev to production list helps to solve immediate problem, but it in turn creates a problem of having dev dependencies in production, which is considered bad solution.
Additional context
The text was updated successfully, but these errors were encountered: