已解决执行./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)
解决方法:

  1. 卸载node
    sudo rm -rf /usr/local/bin/node,npm,lib/node_modules/npm,lib/node,share/man/*/node.*
  2. 安装node12
  3. 降级npm为6.14.10再执行脚本就可以了

以上是关于已解决执行./Scripts/bootstrap.sh报错npm ERR! code ERESOLVE的主要内容,如果未能解决你的问题,请参考以下文章

WebDriverAgent常见错误

Bootstrap3系列:下拉菜单

两个div在同一行显示

Apollo使用命令

如何防止从我的角度站点直接访问 bootstrap.min.js?

Bootstrap CSS 在 ASP.net 上不起作用