跳到主内容
版本:11.x

pnpm runtime <cmd>

Manage runtimes.

Alias: rt

命令

set

Install the specified version of a runtime.

pnpm runtime set <name> <version> [-g]

Supported runtimes

  • node - Node.js
  • deno - Deno
  • bun - Bun

示例

Install Node.js v22 globally:

pnpm runtime set node 22 -g

安装 Node.js 的 LTS 版本:

pnpm runtime set node lts -g

安装最新版本的 Node.js:

pnpm runtime set node latest -g

安装 Node.js 的预发布版本:

pnpm runtime set node nightly -g
pnpm runtime set node rc -g
pnpm runtime set node rc/22 -g
pnpm runtime set node 22.0.0-rc.4 -g

使用其 代码名称 安装 Node.js 的 LTS 版本:

pnpm runtime set node argon -g

Install Deno:

pnpm runtime set deno 2 -g

Install Bun:

pnpm runtime set bun latest -g

配置项

--global, -g

Install the runtime globally.