Environment Variable to Skip Fetching Node with use-node-version
in .npmrc
or pnpm.executionEnv.nodeVersion
in package.json
#8613
MohammedEsafi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context
pnpm projects can specify a Node.js version using:
use-node-version
in.npmrc
pnpm.executionEnv.nodeVersion
inpackage.json
This ensures that developers and environments automatically work with the specified Node.js version.
However, in CI/CD environments, Node.js is often pre-installed in containers or virtual environments. In such cases, automatically fetching the specified Node.js version can be redundant and might increase installation time.
Proposal
Introduce an environment variable e.g.
PNPM_SKIP_NODE_FETCH
to bypass Node.js fetching, even when a version is specified in project configuration. This allows for more flexible Node.js management in various environments.Key Use Cases
Example Usage
When set, this environment variable would allow pnpm to skip fetching the Node.js version, assuming it is already available in the environment.
Benefits
Discussion Points
Beta Was this translation helpful? Give feedback.
All reactions