angular / angular/angularfire

AngularFire 17.0.0 throwing errors with Angular 17.0.0

未关闭
#3,493 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
comp: firestore needs: more info type: bug version: current (v17+)
主要语言
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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。