-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Contribution
- I'd be willing to implement this feature (contributing guide)
Describe the user story
There is automatic detection of NODE_ENV and as a result some dependencies could be omitted during install https://pnpm.io/cli/install#--prod--p
Sometimes you have set NODE_ENV before install, i.e. NODE_ENV=production
and then all dev dependencies will not be installed, but they are required for build. The things can be even more complicated when install command is running by some wrapper tool, and you do not have a way to bypass flags to pnpm
Also, there can be a problem on CI where NODE_ENV can be set globally for a job
Describe the solution you'd like
Option 1 - disable defaults for --prod
and NODE_ENV detection, always install all dependencies unless explicit flag is set to install only specific set of dependencies
Option 2 - add a config property to .npmrc
to skip NODE_ENV detection and install all dependencies
Describe the drawbacks of your solution
No response
Describe alternatives you've considered
No response