ng-bootstrap / ng-bootstrap/ng-bootstrap

Peer dependency error with angular 18 & ng-bootstrap latest

Open
#4,732 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
8.2k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Bug description:

ng add @ng-bootstrap/ng-bootstrap@latest
ℹ Using package manager: npm
✔ Package information loaded.

The package @ng-bootstrap/ng-bootstrap@latest will be installed and executed.
Would you like to proceed? Yes
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: c2c-web@0.0.0
npm error Found: @angular/core@18.0.2
npm error node_modules/@angular/core
npm error peer @angular/core@"18.0.2" from @angular/animations@18.0.2
npm error node_modules/@angular/animations
npm error peerOptional @angular/animations@"18.0.2" from @angular/platform-browser@18.0.2
npm error node_modules/@angular/platform-browser
npm error peer @angular/platform-browser@"18.0.2" from @angular/forms@18.0.2
npm error node_modules/@angular/forms
npm error @angular/forms@"^18.0.0" from the root project
npm error 4 more (@angular/platform-browser-dynamic, ...)
npm error peer @angular/animations@"18.0.2" from @angular/platform-server@18.0.2
npm error node_modules/@angular/platform-server
npm error peerOptional @angular/platform-server@"^18.0.0" from @angular-devkit/build-angular@18.0.3
npm error node_modules/@angular-devkit/build-angular
npm error dev @angular-devkit/build-angular@"^18.0.2" from the root project
npm error 2 more (@angular/build, the root project)
npm error 1 more (the root project)
npm error peer @angular/core@"18.0.2" from @angular/common@18.0.2
npm error node_modules/@angular/common
npm error peer @angular/common@"18.0.2" from @angular/forms@18.0.2
npm error node_modules/@angular/forms
npm error @angular/forms@"^18.0.0" from the root project
npm error peer @angular/common@"18.0.2" from @angular/platform-browser@18.0.2
npm error node_modules/@angular/platform-browser
npm error peer @angular/platform-browser@"18.0.2" from @angular/forms@18.0.2
npm error node_modules/@angular/forms
npm error @angular/forms@"^18.0.0" from the root project
npm error 4 more (@angular/platform-browser-dynamic, ...)
npm error 5 more (@angular/platform-browser-dynamic, ...)
npm error 9 more (@angular/compiler, @angular/forms, ...)
npm error
npm error Could not resolve dependency:
npm error @ng-bootstrap/ng-bootstrap@"17.0.0" from the root project
npm error
npm error Conflicting peer dependency: @angular/core@18.0.4
npm error node_modules/@angular/core
npm error peer @angular/core@"18.0.4" from @angular/forms@18.0.4
npm error node_modules/@angular/forms
npm error @angular/forms@"^18.0.0" from the root project
npm error peer @angular/forms@"^18.0.0" from @ng-bootstrap/ng-bootstrap@17.0.0
npm error node_modules/@ng-bootstrap/ng-bootstrap
npm error @ng-bootstrap/ng-bootstrap@"17.0.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\Admin\AppData\Local\npm-cache_logs\2024-06-26T05_21_59_054Z-eresolve-report.txt

npm error A complete log of this run can be found in: C:\Users\Admin\AppData\Local\npm-cache_logs\2024-06-26T05_21_59_054Z-debug-0.log
✖ Packages installation failed, see above.

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: my pakage.json
"dependencies": {
"@angular/animations": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/platform-server": "^18.0.0",
"@angular/router": "^18.0.0",
"@angular/ssr": "^18.0.2",
"@fortawesome/angular-fontawesome": "^0.15.0",
"@fortawesome/free-brands-svg-icons": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"express": "^4.18.2",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
}

ng-bootstrap: using latest tag

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing ng add @ng-bootstrap/ng-bootstrap@latest with the Angular versions in the reported package.json. Read the npm ERESOLVE output to identify the conflicting peer versions and verify whether the installation succeeds with compatible dependency versions; done means the package installs without force or legacy-peer-deps.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, bootstrap, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.