Skip to main content
Version: Next

pnpm with

新增于:v11.0.0

🌐 Added in: v11.0.0

在单次调用中以特定版本(或当前运行的版本)运行 pnpm,忽略项目清单中的 packageManagerdevEngines.packageManager 字段。

🌐 Run pnpm at a specific version (or the currently running one) for a single invocation, ignoring the packageManager and devEngines.packageManager fields of the project's manifest.

pnpm with <version|current> <args...>

下载的 pnpm 使用与 pnpm self-update 相同的机制安装,并缓存在全局虚拟存储中以便在后续运行中重用。

🌐 The downloaded pnpm is installed using the same mechanism as pnpm self-update and cached in the global virtual store for reuse on subsequent runs.

示例

🌐 Examples

运行全局安装的 pnpm,忽略清单中固定的版本:

🌐 Run the globally installed pnpm, ignoring the version pinned in the manifest:

pnpm with current install

运行特定版本:

🌐 Run a specific version:

pnpm with 11.0.0-rc.1 install

使用 dist 标签:

🌐 Use a dist-tag:

pnpm with next install

🌐 Related settings

pmOnFail

如果你想永久跳过 packageManager / devEngines.packageManager 检查(例如,因为版本管理由 asdf、mise、Volta 或类似工具处理),请将 pmOnFail 设置为 ignore,而不是通过 pnpm with 运行每条命令:

🌐 If you want to permanently skip the packageManager / devEngines.packageManager check (for example, because version management is handled by asdf, mise, Volta, or a similar tool), set the pmOnFail setting to ignore instead of running every command through pnpm with:

pnpm-workspace.yaml
pmOnFail: ignore