angular / angular/angularfire

@angular/build: TS2307: Cannot find module 'firebase/compat'

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

Description

I currently have an Angular 20 application with storage.
I tried to migrate to the new builder system and after running the migration script I get:

>
X [ERROR] TS2307: Cannot find module 'firebase/compat' or its corresponding type declarations. [plugin angular-compiler]

node_modules/.pnpm/@angular+fire@20.0.1_b3d6211399b528bde26c95436c0ed9a1/node_modules/@angular/fire/compat/storage/index.d.ts:9:33:
9 │ import * as firebase_compat from 'firebase/compat';
╵ ~~~~~~~~~~~~~~~~~

With `@angular-devkit/build-angular` it works fine.

Contributor guide

Open the contributing guide

Research direction

Reproduce the Angular 20 migration with @angular/fire compat storage and compare the new builder with @angular-devkit/build-angular. Start from the referenced @angular/fire/compat/storage/index.d.ts import of firebase/compat and the builder migration output. Done means the migrated application builds without TS2307.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.