AngularFire 17.0.0 throwing errors with Angular 17.0.0
- 主要語言
- TypeScript
- 星號
- 7.8k
- 分支
- 2.2k
- 平均合併
- 22 小時 28 分鐘
- 30 天內合併 PR
- 6
描述
I have recently upgraded to the newest angularfire 17.0.0 and am having trouble getting some fairly straight forward things working. Filled out the template below. Thanks for your help.
### Version info
**Angular:** 17.0.0
**Firebase:** 10.7.1
**AngularFire:** 17.0.0
**Steps to set up and reproduce**
**Sample data and security rules**
### Debug output
** Errors in the JavaScript console **
`Internal server error: R3InjectorError(Standalone[_AppComponent])[_ShareableService -> _ShareableService -> Firestore2 -> Firestore2]:
NullInjectorError: No provider for Firestore2!
at NullInjector.get (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:5467:21)
at R3Injector.get (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:5918:27)
at R3Injector.get (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:5918:27)
at injectInjectorOnly (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:910:36)
at Module.ɵɵinject (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:916:40)
at Object.ShareableService_Factory (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/src/app/shareable.service.ts:7:30)
at eval (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:6030:33)
at runInInjectorProfilerContext (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:871:5)
at R3Injector.hydrate (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:6029:9)
at R3Injector.get (c:/Users/ecanc/OneDrive/Documents/CaloKiwi/public/card/node_modules/@angular/core/fesm2022/core.mjs:5909:23) (x2)
`
** Screenshots **
[Error](https://snipboard.io/wKpF23.jpg)
[Injection](https://snipboard.io/dHOni7.jpg)
### Expected behavior
Compiling and injecting correctly
### Actual behavior
Getting error when injecting
貢獻指南
研究方向
使用 Angular 17.0.0、Firebase 10.7.1 和 AngularFire 17.0.0 重現,然後從 src/app/shareable.service.ts 中的注入點開始,查看報告中連結的 AngularFire Developer Guide。完成條件是找出 Firestore2 沒有 provider 的原因,並確認應用程式能夠編譯並注入 service,且不會出現報告的 NullInjectorError。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- angular, typescript
- 領域
- database, frontend
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100