Skip to content

Disable NODE_ENV detection during install #8827

@aspirisen

Description

@aspirisen

Contribution

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy