RUDE

Угловая установка начальной загрузки с ошибкой ERESOLVE

Я хочу добавить ng-bootstrap, но ERESOLVE сталкивался со мной каждый раз, когда я пытался его добавить:

ng add @ng-bootstrap/ng-bootstrap --legacy-peer-deps
ℹ Using package manager: npm
⚠ Unable to find compatible package. Using 'latest' tag.
⚠ Package has unmet peer dependencies. Adding the package may not succeed.

The package @ng-bootstrap/ng-bootstrap@12.1.2 will be installed and executed.
Would you like to proceed? Yes
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: admin-dashboard@0.0.0
npm ERR! Found: @angular/common@14.0.4
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^14.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^13.0.0" from @ng-bootstrap/ng-bootstrap@12.1.2
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 /home/Coding/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/Coding/.npm/_logs/2022-07-03T12_48_18_862Z-debug-0.log
✖ Packages installation failed, see above.

Вывод версии ng ниже:

Angular CLI: 14.0.4
Node: 16.15.1
Package Manager: npm 8.11.0 
OS: linux x64

Angular: 14.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.4
@angular-devkit/build-angular   14.0.4
@angular-devkit/core            14.0.4
@angular-devkit/schematics      14.0.4
@schematics/angular             14.0.4
rxjs                            7.5.5
typescript                      4.7.4

Вот вся информация о моей системе nodejs и самом angular. бьюсь с этой проблемой около 10 часов безрезультатно помогите пожалуйста!!!


306
2

Ответы:

Вы случайно не пробовали ту же команду с флагом --force? Обычно это помогает.


Решено

Ты не один на острове. Кажется, это известная проблема:

Https://github.com/ng-bootstrap/ng-bootstrap/issues/4340

Похоже, вам может понадобиться использовать Angular 13, пока это не будет исправлено.