pnpm env <cmd>

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

Install Node.js v16:

  1. pnpm env use --global 16

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

Install an LTS version of Node.js using its codename:

  1. pnpm env use --global argon

remove, rm

Removes the specified version of Node.JS.

Usage example:

  1. pnpm env remove --global 14.0.0

list, ls

List Node.js versions available locally or remotely.

Print locally installed versions:

  1. pnpm env list

Print remotely available Node.js versions:

  1. pnpm env list --remote

Print remotely available Node.js v16 versions:

  1. pnpm env list --remote 16

Options

--global, -g

The changes are made systemwide.