Skip to main content
Version: Next

pnpm setup

此命令由 pnpm 的独立安装脚本使用。例如,在 https://get.pnpm.io/install.sh 中。

🌐 This command is used by the standalone installation scripts of pnpm. For instance, in https://get.pnpm.io/install.sh.

安装程序执行以下操作:

🌐 Setup does the following actions:

  • 为 pnpm CLI 创建主目录
  • 通过更新 shell 配置文件,将 pnpm 主目录添加到 PATH
  • 将 pnpm 可执行文件复制到 pnpm 主目录
tip

升级到 pnpm v11 后,运行 pnpm setup 来更新你的 shell 配置。在 v11 中,全局安装的二进制文件存储在 PNPM_HOMEbin 子目录中。

🌐 After upgrading to pnpm v11, run pnpm setup to update your shell configuration. In v11, globally installed binaries are stored in a bin subdirectory of PNPM_HOME.