在我的角度13上安装ngx toastr时出错。
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: p4-padmin@0.0.0
npm ERR! Found: @angular/common@13.0.3
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~13.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@">=14.0.0-0" from ngx-toastr@15.0.0
npm ERR! node_modules/ngx-toastr
npm ERR! ngx-toastr@"*" 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\xyz\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\xyz\AppData\Local\npm-cache\_logs\2022-06-27T09_19_20_284Z-debug.log
发布于 2022-09-14 13:46:17
这对我起了作用:
package-lock.json
项目文件夹中
"./node_modules/font-awesome/css/font-awesome.css“"./node_modules/ngx-toastr/toastr.css""
如果您遇到有关“字体-可怕”的错误,请运行-> npm安装-保存字体-可怕-强制
第二种方式(这也起作用):
的说明,
希望这能帮上忙。
https://stackoverflow.com/questions/72769748
复制相似问题