【pnpm报错】ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY

ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  Broken lockfile: no entry for
‘/react-dom/[email protected]’ in pnpm-lock.yaml

原因:https://github.com/pnpm/pnpm/issues/4684

【pnpm报错】ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY_第1张图片

【pnpm报错】ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY_第2张图片

解决方案:
①升级pnpm为最新版本/<7.0.0

npm i -g pnpm@latest 

②在.npmrc设置

auto-install-peers=true
strict-peer-dependencies=false

③手动设置

pnpm up --config.strict-peer-dependencies=false

我是用了升级版本的方式,最后是成功了

你可能感兴趣的:(pnpm,pnpm)