我在执行“ ng添加 @angular/本地化”或“ ng add @ng-bootstrap/ng-bootstrap”时遇到问题。
我是初学者,不明白错误指示。我正在附上屏幕截图。
angular版本屏幕截图
错误屏幕截图
ps d:\ completejavaclasses \ angularClasscjc \ angular-project> ng添加 @angular/本地化
ℹ使用软件包管理器:NPM
✔找到了兼容的包装版本: @angular/
包 @angular/ [emagy  nbsp;
您想继续吗?是的
npm err!代码eresolve
npm err! Eresolve无法解决
npm err!
npm err!解决方案: @ng-bootstrap/
npm err! node_modules/@angular/forms
npm err! @angular/forms@“^14.0.0” root Project
npm err! peer @angular/common @“ 14.0.1”来自 @angular/
npm err! node_modules/@angular/platform-browser
npm err! peer @angular/platform-browser @“ 14.0.1”来自 @angular/ email  ]
npm err! node_modules/@angular/forms
npm err! @angular/forms@“^14.0.0” root Project
npm err! peer @angular/platform-browser @“ 14.0.1”来自 @angular/ [电子邮件 受保护]
npm err! node_modules/@angular/platform-browser-dynamic
npm err! @angular/platform-browser-dynamic@“^14.0.0”
npm err!另外2(@angular/Router,root Project)
npm err! 3多( @angular/platform-browser-dynamic, @angular/router,root project)
npm err!
npm err!无法解决依赖性:
npm err! peer @angular/common @“^13.0.0”来自 @ng-bootstrap/
npm err! node_modules/@ng-bootstrap/ng-bootstrap
npm err! @ng-bootstrap/ng-bootstrap@“^12.1.2” root项目
npm err!
npm err!相互冲突的同伴依赖性: @angular/[email 受保护]
npm err! node_modules/@ng-bootstrap/ng-bootstrap
npm err! @ng-bootstrap/ng-bootstrap@“^12.1.2” root项目
npm err!
npm err!修复上游依赖冲突或重试
npm err!此命令带有 - 法或 - 掌控式deps
npm err!接受不正确(并可能破坏)依赖性解决方案。
npm err!
npm err!请参阅C:\ users \ 91976 \ appdata \ local \ npm-cache \ eresolve-report.txt,以获取完整报告。
npm err!可以在以下方式中找到此运行的完整日志
npm err! C:\ USER \ 91976 \ AppData \ local \ npm-cache_logs \ 2022-06-12T13_32_32_32_32_358Z-DEBUG-0.LOG
✖软件包安装失败,请参见上文。
`
I am having issues while doing "ng add @angular/localize" or "ng add @ng-bootstrap/ng-bootstrap".
I am a beginner and don't understand what the error indicates. I am attaching the screenshots.
angular version screenshot
error screenshot
`
PS D:\CompleteJavaClasses\angularclasscjc\angular-project> ng add @angular/localize
ℹ Using package manager: npm
✔ Found compatible package version: @angular/[email protected].
✔ Package information loaded.
The package @angular/[email protected] will be installed and executed.
Would you like to proceed? Yes
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @ng-bootstrap/[email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"14.0.1" from @angular/[email protected]
npm ERR! node_modules/@angular/forms
npm ERR! @angular/forms@"^14.0.0" from the root project
npm ERR! peer @angular/common@"14.0.1" from @angular/[email protected]
npm ERR! node_modules/@angular/platform-browser
npm ERR! peer @angular/platform-browser@"14.0.1" from @angular/[email protected]
npm ERR! node_modules/@angular/forms
npm ERR! @angular/forms@"^14.0.0" from the root project
npm ERR! peer @angular/platform-browser@"14.0.1" from @angular/[email protected]
npm ERR! node_modules/@angular/platform-browser-dynamic
npm ERR! @angular/platform-browser-dynamic@"^14.0.0" from the root project
npm ERR! 2 more (@angular/router, the root project)
npm ERR! 3 more (@angular/platform-browser-dynamic, @angular/router, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^13.0.0" from @ng-bootstrap/[email protected]
npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
npm ERR! @ng-bootstrap/ng-bootstrap@"^12.1.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"^13.0.0" from @ng-bootstrap/[email protected]
npm ERR! node_modules/@ng-bootstrap/ng-bootstrap
npm ERR! @ng-bootstrap/ng-bootstrap@"^12.1.2" 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\91976\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\91976\AppData\Local\npm-cache_logs\2022-06-12T13_32_55_358Z-debug-0.log
✖ Packages installation failed, see above.
`
发布评论
评论(1)
在项目中运行此命令时,您会看到什么:
并与我们分享。
what do you see when you run this command in you project:
and share it with us.