已解决执行./Scripts/bootstrap.sh报错npm ERR! code ERESOLVE
Posted up up!
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了已解决执行./Scripts/bootstrap.sh报错npm ERR! code ERESOLVE相关的知识,希望对你有一定的参考价值。
报错内容如下:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: web-driver-inspector@1.0.0
npm ERR! Found: react@15.6.1
npm ERR! node_modules/react
npm ERR! react@"15.6.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.7.0" from react-dom@15.7.0
npm ERR! node_modules/react-dom
npm ERR! react-dom@"^15.6.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/yanxiaofei/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
原因:node和npm版本不兼容(先卸载node,再安装node12,降级npm为6.14.10)
解决方法:
- 卸载node
sudo rm -rf /usr/local/bin/node,npm,lib/node_modules/npm,lib/node,share/man/*/node.*
- 安装node12
- 降级npm为6.14.10再执行脚本就可以了
以上是关于已解决执行./Scripts/bootstrap.sh报错npm ERR! code ERESOLVE的主要内容,如果未能解决你的问题,请参考以下文章