ERESOLVE-Fehler bei der winkelbetriebenen Bootstrap-Installation

Ich möchte ng-bootstrap hinzufügen, aber ERESOLVE hat mich jedes Mal konfrontiert, wenn ich versuche, es hinzuzufügen:

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/[email protected] 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: [email protected]
npm ERR! Found: @angular/[email protected]
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/[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 /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.

Die Ausgabe der ng-Version ist unten:

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

hier sind alle infos über mein system nodejs und angle selbst . Ich habe ungefähr 10 Stunden lang ohne Ergebnis gegen dieses Problem gekämpft, bitte helfen Sie !!!

🤔 А знаете ли вы, что...
Для создания пользовательских интерфейсов в Angular используется декларативный язык шаблонов.


306
2

Antworten:

Hast du zufällig den gleichen Befehl mit dem --force-Flag ausprobiert? Dies macht normalerweise den Trick.


Gelöst

Du bist nicht allein auf der Insel. Das scheint ein bekanntes Problem zu sein:

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

Klingt so, als müssten Sie möglicherweise Angular 13 verwenden, bis dies gepatcht wird.