npm install ngx-toastr --save -> 无法解析依赖关系:peer @angular/core@"12.0.3" from @angular/common@12.0.3
npm install ngx-toastr --save -> Could not resolve dependency: peer @angular/core@"12.0.3" from @angular/common@12.0.3
我的版本:
- Angular CLI:11.2.7
- 节点:14.15.5
我的 package.json 依赖关系
"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
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
toastr 依赖的任何版本不匹配?请帮忙。
你试过安装 ngx-toastr@12.x 吗?
这个错误出现在最新的稳定版本(14.0.0)中。
我试过安装一个最旧的版本,它成功了
npm install ngx-toastr@13.2.1 --save
Angular命令行界面:11.2.14
节点:v15.0.1
我的版本:
- Angular CLI:11.2.7
- 节点:14.15.5
我的 package.json 依赖关系
"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
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
toastr 依赖的任何版本不匹配?请帮忙。
你试过安装 ngx-toastr@12.x 吗?
这个错误出现在最新的稳定版本(14.0.0)中。
我试过安装一个最旧的版本,它成功了
npm install ngx-toastr@13.2.1 --save
Angular命令行界面:11.2.14
节点:v15.0.1