简体   繁体   English

如何在ubuntu中安装旧版pnpm

[英]How to install old version of pnpm in ubuntu

I need to install the old version of pnpm v6.24.2 for woocommerce-admin current version is 7.9.0 also getting errors while running npm build :我需要为woocommerce-admin安装旧版本的pnpm v6.24.2 当前版本是 7.9.0 在运行npm build时也会出错:

Your pnpm version is incompatible with "/home/user/Desktop/woocommerce-admin".

Expected version: ^6.24.2
Got: 7.9.0

This is happening because the package's manifest has an engines.pnpm field specified.
To fix this issue, install the required pnpm version globally.

You can run:你可以运行:

pnpm install --global pnpm@latest-6

Alternatively, if you use Corepack , you may add this to your package.json :或者,如果您使用Corepack ,您可以将其添加到package.json

{
  "packageManager": "pnpm@6.34.0"
}

Corepack automatically manages pnpm versions, so if you will run pnpm inside that project, Corepack will install and run the right version of pnpm. Corepack 自动管理 pnpm 版本,因此如果您将在该项目中运行pnpm ,Corepack 将安装并运行正确版本的 pnpm。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM