@angular/cli v20. NPM cannot resolve @angular/fire
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- angular, firebase, node.js, typescript
Hướng nghiên cứu
Bắt đầu với package.json được báo cáo và tái hiện cả ng add @angular/fire lẫn npm i @angular/fire bằng các phiên bản Angular 20.1.x, Firebase 12.1.0, Node 22.18.0 và npm 10.9.3 được liệt kê. Kiểm tra các peer dependencies của @angular/fire@20.0.1 và so sánh chúng với các gói Angular đã được phân giải. Công việc được xem là hoàn tất khi một dự án Angular 20 mới có thể cài đặt @angular/fire mà không cần --force hoặc --legacy-peer-deps.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm trying to install @angular/fire to my Angular 20 project, but NPM won't resolve the package.
package.json
{
"name": "my-project",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"prettier": {
"overrides": [
{
"files": "*.html",
"options": {
"parser": "angular"
}
}
]
},
"private": true,
"dependencies": {
"@angular/common": "^20.1.0",
"@angular/compiler": "^20.1.0",
"@angular/core": "^20.1.0",
"@angular/forms": "^20.1.0",
"@angular/platform-browser": "^20.1.0",
"@angular/router": "^20.1.0",
"@ng-select/ng-select": "^20.1.2",
"firebase": "^12.1.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular/build": "^20.1.5",
"@angular/cli": "^20.1.5",
"@angular/compiler-cli": "^20.1.0",
"@types/jasmine": "~5.1.0",
"jasmine-core": "~5.8.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.8.2"
}
}
I'm using the add command
ng add @angular/fire
Output
√ Determining Package Manager
› Using package manager: npm
√ Searching for compatible package version
› Found compatible package version: @angular/fire@20.0.1.
√ Loading package information from registry
√ Confirming installation
× Unable to install package
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: my-project@0.0.0
npm error Found: @angular/core@20.1.6
npm error node_modules/@angular/core
npm error peerOptional @angular/core@"^20.0.0" from @angular/build@20.1.5
npm error node_modules/@angular/build
npm error dev @angular/build@"^20.1.5" from the root project
npm error peer @angular/core@"20.1.6" from @angular/common@20.1.6
npm error node_modules/@angular/common
npm error peer @angular/common@"20.1.6" from @angular/forms@20.1.6
npm error node_modules/@angular/forms
npm error peer @angular/forms@"^20.0.0" from @ng-select/ng-select@20.1.2
npm error node_modules/@ng-select/ng-select
npm error @ng-select/ng-select@"^20.1.2" from the root project
npm error 1 more (the root project)
npm error peer @angular/common@"20.1.6" from @angular/platform-browser@20.1.6
npm error node_modules/@angular/platform-browser
npm error peerOptional @angular/platform-browser@"^20.0.0" from @angular/build@20.1.5
npm error node_modules/@angular/build
npm error dev @angular/build@"^20.1.5" from the root project
npm error 3 more (@angular/forms, @angular/router, the root project)
npm error 3 more (@angular/router, @ng-select/ng-select, the root project)
npm error 5 more (@angular/forms, @angular/platform-browser, ...)
npm error
npm error Could not resolve dependency:
npm error @angular/fire@"20.0.1" from the root project
npm error
npm error Conflicting peer dependency: @angular/core@20.1.7
npm error node_modules/@angular/core
npm error peer @angular/core@"20.1.7" from @angular/platform-browser-dynamic@20.1.7
npm error node_modules/@angular/platform-browser-dynamic
npm error peer @angular/platform-browser-dynamic@"^20.0.0" from @angular/fire@20.0.1
npm error node_modules/@angular/fire
npm error @angular/fire@"20.0.1" 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\Marco\AppData\Local\npm-cache\_logs\2025-08-15T19_42_39_683Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\Marco\AppData\Local\npm-cache\_logs\2025-08-15T19_42_39_683Z-debug-0.log
Angular version
Angular CLI: 20.1.5
Node: 22.18.0
Package Manager: npm 10.9.3
OS: win32 x64
Angular: 20.1.6
... common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.2001.5
@angular-devkit/core 20.1.5
@angular-devkit/schematics 20.1.5
@angular/build 20.1.5
@angular/cli 20.1.5
@schematics/angular 20.1.5
rxjs 7.8.2
typescript 5.8.3
zone.js 0.15.1
Same thing happens if I install directly with npm
npm i @angular/fire
- Ngôn ngữ chính
- TypeScript
- Star
- 7.8k
- Fork
- 2.2k
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của angular/angularfire
-
comp: build/pipeline type: bug version: current (v17+)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
angular/angularfire#3766 ·
-
comp: schematics type: bug version: current (v17+)
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
angular/angularfire#3768 ·
-
comp: docs type: chore version: current (v17+)
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
angular/angularfire#3764 ·
-
comp: firestore comp: ssr priority: P0 (critical) type: feature version: current (v17+)
angular/angularfire#3757 · 1 người được giao ·
-
Six `firebase` entry points have no `@angular/fire` equivalent, so their exports are unreachable Đang mởcomp: core type: feature
angular/angularfire#3755 · 1 người được giao ·
Tất cả issue của angular/angularfire
Issue tương tự
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Đang mởclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
supermomonga/zcode-acp#24 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
growthbook/growthbook#7100 ·
-
triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100