npm ERR! While resolving: undefined@undefined npm ERR! Found: umi@3.3.9 npm ERR! node_modules/umi np

  • Post author:
  • Post category:其他


$ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: umi@3.3.9
npm ERR! node_modules/umi
npm ERR!   umi@"^3.3.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer umi@"3.0.0-beta.20" from @alitajs/hd@2.7.6
npm ERR! node_modules/@alitajs/hd
npm ERR!   @alitajs/hd@"^2.6.16" 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 C:\Users\Administrator\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-03-01T08_44_38_190Z-debug.log

React重启项目报错是因为自己没注意修改了淘宝镜像,所以试试 cnpm

先删除

rm -rf node_modules/

在安装

 cnpm install gulp-sass --save-dev

最后

 cnpm install

启动项目

npm   start



版权声明:本文为weixin_45663264原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。