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

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

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

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.

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
**

Dominant language
TypeScript
Stars
7.8k
Forks
2.1k
Avg merge
2d 22h
Merged PRs (30d)
25

Getting set up

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.

More from angular/angularfire

All issues in angular/angularfire

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.