ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY Broken lockfile: no entry for
‘/react-dom/18.2.0_react@16.14.0’ in pnpm-lock.yaml
原因:https://github.com/pnpm/pnpm/issues/4684
解决方案:
①升级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
我是用了升级版本的方式,最后是成功了