首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm错误!分辨率:metronic-角@6.1.8

npm错误!分辨率:metronic-角@6.1.8
EN

Stack Overflow用户
提问于 2022-04-01 14:09:35
回答 1查看 214关注 0票数 0

我有项目在角度8与metronic后,上升到角10,当我试图安装npm I时,每次得到这个错误。

npm ERR! While resolving: metronic-angular@6.1.8

npm ERR! Found: @angular/common@10.2.5

代码语言:javascript
复制
  npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR!
  npm ERR! While resolving: metronic-angular@6.1.8
  npm ERR! Found: @angular/common@10.2.5
  npm ERR! node_modules/@angular/common
  npm ERR!   @angular/common@"^10.2.5" from the root project
  npm ERR!
  npm ERR! Could not resolve dependency:
  npm ERR! peer @angular/common@"^8.0.0 || ^9.0.0-0" from @angular/cdk@8.2.3
  npm ERR! node_modules/@angular/cdk
  npm ERR!   @angular/cdk@"^8.2.3" 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.

这是截图

如有任何帮助,将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2022-04-01 15:55:24

请把package.json附上去好吗?看起来@angular/cdk还没有增加到v10。我最近有一个类似的问题,同时更新的角度,甚至正确的版本指定。我以下列方式固定:

可以通过命令rm -rf node_modules

  • Deleting package-lock.json

  • Re-running npm install

执行

  • 删除node_modules
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71708262

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档