Comments (11)
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
pnpm install
so it forces it to installdevDependencies
, and then runspnpm prune --prod
during the prune step to remove thedevDependencies
after building.
Thanks a ton for your buildpack! Solved the only problem I had with my deployment setup.
from heroku-buildpack-pnpm.
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 pnpm install
so it forces it to install devDependencies
, and then runs pnpm prune --prod
during the prune step to remove the devDependencies
after building.
from heroku-buildpack-pnpm.
I've created a pull request #20 to fix this issue based on my fork referenced above.
from heroku-buildpack-pnpm.
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.
from heroku-buildpack-pnpm.
Would appreciate this as well, the official npm buildpack also has the same behavior.
from heroku-buildpack-pnpm.
Agreed, If this were working I would continue to use it.
from heroku-buildpack-pnpm.
pnpm
command respects the NODE_ENV
environment variable to install dev dependencies (or not). Is this not sufficient?
Or you would like pnpm prune --prod
executed after the build is complete?
from heroku-buildpack-pnpm.
pnpm
command respects theNODE_ENV
environment variable to install dev dependencies (or not). Is this not sufficient?
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.
from heroku-buildpack-pnpm.
pnpm
command respects theNODE_ENV
environment variable to install dev dependencies (or not). Is this not sufficient?Or you would like
pnpm prune --prod
executed after the build is complete?
So the issue is that while pnpm
respects the NODE_ENV
variable, its does not install the dev dependencies in the build stage, which causes the build to fail, at least for me this is the case.
from heroku-buildpack-pnpm.
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.
from heroku-buildpack-pnpm.
@hampusborgos close this plz
from heroku-buildpack-pnpm.
Related Issues (14)
- node: command not found HOT 2
- Regression: missed `pnpm` HOT 2
- Support --no-optional (skip optional dependencies)
- ERR_PNPM_PREPARE_PKG_FAILURE
- Can we start adding GitHub 'releases' per version of this buildpack?
- Downloading PNPM fails HOT 1
- Node_modules not caching when deploying on dokku HOT 3
- bin/compile: line 233: pnpm: command not found HOT 3
- Husky not found HOT 1
- PNPM_VERSION env var is not respected anymore if the version is specified in the package.json
- Allow --filter argument for selectively installing dependencies HOT 2
- Prune dev dependencies step also runs prepare script HOT 1
- Pruning devDependencies asks me to remove and reinstall from scratch.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-pnpm.