Nb
Study
.com
🔍 请输入搜索关键字
  • 首页
  • 课程
  • 小记
  • 我的学习
< prev 5 / 5more >

如何不同项目使用不同版本的pnpm

Using Corepack

Since v16.13, Node.js is shipping Corepack for managing package managers. This is an experimental feature, so you need to enable it by running:

bash 复制代码
corepack enable pnpm

If you installed Node.js using Homebrew, you'll need to install corepack separately:

You can pin the version of pnpm used on your project using the following command:

bash 复制代码
corepack use pnpm@latest

This will add a "packageManager" field in your local package.json which will instruct Corepack to always use a specific version on that project. This can be useful if you want reproducability, as all developers who are using Corepack will use the same version as you. When a new version of pnpm is released, you can re-run the above command.

< prev 5 / 5more >
nbstudy.com

Copyright © 2021 - All right reserved

浙ICP备2021032786号-6