pnpm CI, Env, and Patching/Use a specific Node version

Install and activate a Node.js version globally through pnpm.

Section: Environment and Node Runtime

Use a specific Node version

bash
bash
pnpm env use --global 22
Explanation

Install and activate a Node.js version globally through pnpm.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Environment and Node Runtime
List installed Node.js versions
Show Node versions installed by pnpm env.
OpenIn sheetbashsame section
Remove a Node version
Remove a previously installed Node.js version.
OpenIn sheetbashsame section
Print binary directory
Show the directory where pnpm-linked binaries live for the current project.
OpenIn sheetbashsame section
Print node_modules root
Show the root node_modules path for the current project.
OpenIn sheetbashsame section
CI install with frozen lockfile
Common CI install pattern that refuses lockfile changes.
OpenIn sheetbash1 tag match
Patch a dependency
Extract a dependency for local edits before creating a patch.
OpenIn sheetbash1 tag match