首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm安装ngx-toastr --保存->无法解决依赖关系: peer @angular/core@"12.0.3“(从”角/公共“到”12.0.3“)

npm安装ngx-toastr --保存->无法解决依赖关系: peer @angular/core@"12.0.3“(从”角/公共“到”12.0.3“)
EN

Stack Overflow用户
提问于 2021-06-09 09:09:12
回答 2查看 2.6K关注 0票数 0

My版本:

  • 角CLI: 11.2.7
  • 节点: 14.15.5

我的package.json依赖关系

代码语言:javascript
复制
 "dependencies": {
    "@angular/animations": "~11.2.8",
    "@angular/cdk": "^11.2.12",
    "@angular/common": "^12.0.3",
    "@angular/compiler": "~11.2.8",
    "@angular/core": "~11.2.8",
    "@angular/forms": "~11.2.8",
    "@angular/material": "^11.2.12",
    "@angular/platform-browser": "~11.2.8",
    "@angular/platform-browser-dynamic": "~11.2.8",
    "@angular/router": "~11.2.8",
    "@videogular/ngx-videogular": "^3.0.1",
    "axios": "^0.21.1",
    "bootstrap": "^5.0.0-beta3",
    "ng-uikit-pro-standard": "^1.0.0",
    "rxjs": "~6.6.0",
    "tslib": "^2.0.0",
    "video.js": "^7.11.8",
    "zone.js": "~0.11.3"
  },

当我试图安装npm install ngx-toastr --save

代码语言:javascript
复制
npm ERR! Found: @angular/core@11.2.14
npm ERR! node_modules/@angular/core
npm ERR!   @angular/core@"~11.2.8" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"12.0.3" from @angular/common@12.0.3
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^12.0.3" from the root project
npm ERR!   peer @angular/common@">=12.0.0-0" from ngx-toastr@14.0.0
npm ERR!   node_modules/ngx-toastr
npm ERR!     ngx-toastr@"*" from the root project

烤面包依赖的版本不匹配吗?请帮帮忙。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2021-07-06 22:00:09

此错误出现在最新的稳定版本(14.0.0)中。

我试着安装一个最老的版本,它成功了。

代码语言:javascript
复制
npm install ngx-toastr@13.2.1 --save

角CLI: 11.2.14

节点: v15.0.1

票数 1
EN

Stack Overflow用户

发布于 2021-06-30 13:09:38

你试过安装ngx-toastr@12.x吗?

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

https://stackoverflow.com/questions/67901004

复制
相关文章

相似问题

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