pnpm env <cmd>

Added in: v6.12.0

Manages the Node.js environment.

Commands

use

Install and use the specified version of Node.js

Install the LTS version of Node.js:

  1. pnpm env use --global lts
  2. pnpm env use --global argon

Install Node.js v16:

  1. pnpm env use --global 16

Also since v6.18.0:

Install a prerelease version of Node.js:

  1. pnpm env use --global nightly
  2. pnpm env use --global rc
  3. pnpm env use --global 16.0.0-rc.0
  4. pnpm env use --global rc/14

Install the latest version of Node.js:

  1. pnpm env use --global latest

Options

--global, -g

The changes are made systemwide.