You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
下面是最简单、可靠的做法,让 pnpm 按现有的 yarn.lock 来安装依赖:
确保安装了 pnpm(建议用 Corepack 管理)
在项目根目录执行导入(会把 yarn.lock 转成 pnpm-lock.yaml)
生成好 pnpm-lock.yaml 后,严格按锁文件安装:
可选参数与注意事项:
package.json添加:执行顺序示例(Windows Git Bash/PowerShell 都可):
这样就能让 pnpm 依据现有 yarn.lock 生成等价的 pnpm-lock.yaml,并严格复现依赖树。
Beta Was this translation helpful? Give feedback.
All reactions