首页 前端知识 运行错误 npm ERR! ERESOLVE unable to resolve dependency tree

运行错误 npm ERR! ERESOLVE unable to resolve dependency tree

2024-05-10 22:05:17 前端知识 前端哥 919 671 我要收藏

运行出现以下错误是由于npm版本过高导至的。

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mf-turbinemonitor2@0.0.0
npm ERR! Found: stylelint@15.4.0
npm ERR! node_modules/stylelint
npm ERR!   dev stylelint@"^15.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer stylelint@">= 11.x < 15" from stylelint-config-prettier@9.0.5
npm ERR! node_modules/stylelint-config-prettier
npm ERR!   dev stylelint-config-prettier@"^9.0.5" 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!
npm ERR! For a full report see:
npm ERR! C:\Users\zhang\AppData\Local\npm-cache\_logs\2024-04-03T09_53_27_294Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\zhang\AppData\Local\npm-cache\_logs\2024-04-03T09_53_27_294Z-debug-0.log

 解决办法:  npx -p npm@6 npm i --legacy-peer-deps

 

转载请注明出处或者链接地址:https://www.qianduange.cn//article/8099.html
标签
评论
发布的文章
大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!