angular / angular/angularfire

Error uploading image: Error: Either AngularFireModule has not been provided in your AppModule ( project v17 standalone)

Open
#3,552 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.8k
Forks
2.2k
Avg merge
22h 28m
Merged PRs (30d)
6

Description

### Version info

**Angular: 17.3.0 **

**Firebase: 10.12.2**

**AngularFire: 17.1.0**

### Debug output

** Errors in the JavaScript console:
Error uploading image: Error: Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).
at getSchedulers (angular-fire.mjs:142:11)
at runOutsideAngular (angular-fire.mjs:148:10)
at angular-fire.mjs:216:17
at _UploadService. (upload.service.ts:15:23)
at Generator.next ()
at main.js:18:61
at new ZoneAwarePromise (zone.js:2611:25)
at __async (main.js:2:10)
at _UploadService.uploadFile (upload.service.ts:12:30)
at _DialogExaminationFormUpdateComponent. (dialog-examination-form-update.component.ts:125:54)
**

** Screenshots
![image](https://github.com/angular/angularfire/assets/110329262/3529b0fd-d6e9-46cf-b654-e18de8c86861)
**

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the upload failure and inspect upload.service.ts, especially the calls at lines 12 and 15, then trace how the standalone application's providers are configured. Compare that setup with the AngularFire initialization path implicated by the error. Done means the image upload no longer raises this provider error and the relevant configuration is covered by a clear reproduction or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, firebase, typescript
Domain
cloud, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.