Skip to content

Error in complilation ERROR in node_modules/@angular/fire/firebase.app.module.d.ts:2:10 - error TS2614 #2622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rogerbobbio opened this issue Oct 27, 2020 · 28 comments

Comments

@rogerbobbio
Copy link

rogerbobbio commented Oct 27, 2020

Hi, Please help me with the folllowing compiling issue:

I have installed :

My project have the following dependencies:

"@angular/animations": "^10.0.14",
"@angular/cdk": "^10.2.2",
"@angular/common": "~10.0.2",
"@angular/compiler": "~10.0.2",
"@angular/core": "~10.0.2",
"@angular/forms": "~10.0.2",
"@angular/material": "^10.2.2",
"@angular/platform-browser": "~10.0.2",
"@angular/platform-browser-dynamic": "~10.0.2",
"@angular/router": "~10.0.2",
"angularfire2": "^5.4.2",
"chart.js": "^2.9.3",
"firebase": "^8.0.0",
"ng2-charts": "^2.4.1",
"ngx-pagination": "^5.0.0",
"rxjs": "~6.5.5",
"sweetalert2": "^9.17.2",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"

Compilation output

ERROR in node_modules/@angular/fire/firebase.app.module.d.ts:2:10 - error TS2614: Module '"../../firebase"' has no exported member 'auth'. Did you mean to use 'import auth from "../../firebase"' instead?

2 import { auth, database, messaging, storage, firestore, functions } from 'firebase/app';
           ~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:16 - error TS2614: Module '"../../firebase"' has no exported member 'database'. Did you mean to use 'import database from "../../firebase"' instead?

2 import { auth, database, messaging, storage, firestore, functions } from 'firebase/app';
                 ~~~~~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:26 - error TS2614: Module '"../../firebase"' has no exported member 'messaging'. Did you mean to use 'import messaging from "../../firebase"' instead?

2 import { auth, database, messaging, storage, firestore, functions } from 'firebase/app';
                           ~~~~~~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:37 - error TS2614: Module '"../../firebase"' has no exported member 'storage'. Did you mean to use 'import storage from "../../firebase"' instead?

2 import { auth, database, messaging, storage, firestore, functions } from 'firebase/app';
                                      ~~~~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:46 - error TS2614: Module '"../../firebase"' has no exported member 'firestore'. Did you mean to use 'import firestore from "../../firebase"' instead?

2 import { auth, database, messaging, storage, firestore, functions } from 'firebase/app';
                                               ~~~~~~~~~
node_modules/@angular/fire/firebase.app.module.d.ts:2:57 - error TS2614: Module '"../../firebase"' has no exported member 'functions'. Did you mean to use 'import functions from "../../firebase"' instead?

2 import { auth, database, messaging, storage, firestore, functions } from 'firebase/app';
                                                          ~~~~~~~~~
node_modules/@angular/fire/storage/interfaces.d.ts:1:10 - error TS2614: Module '"../../../firebase"' has no exported member 'storage'. Did you mean to use 'import storage from "../../../firebase"' instead?

1 import { storage } from 'firebase/app';
           ~~~~~~~
node_modules/@angular/fire/storage/observable/fromTask.d.ts:3:10 - error TS2614: Module '"../../../../firebase"' has no exported member 'storage'. Did you mean to use 'import storage from "../../../../firebase"' instead?

3 import { storage } from 'firebase/app';
           ~~~~~~~
node_modules/@angular/fire/database/interfaces.d.ts:2:10 - error TS2614: Module '"../../../firebase"' has no exported member 'database'. Did you mean to use 'import database from "../../../firebase"' instead?

2 import { database } from 'firebase/app';
           ~~~~~~~~

image

@ingrocha
Copy link

Same here!

@xylo04
Copy link

xylo04 commented Oct 27, 2020

This is a duplicate of #2619.

@devsandro
Copy link

Same issue here

@Puthxii
Copy link

Puthxii commented Oct 28, 2020

Same here

@KingDarBoja
Copy link
Contributor

Please use latest version of Firebase v7 instead of v8 as angularfire is not compatible yet. A pull request has been made addressing this update at #2620.

@rogerbobbio
Copy link
Author

Thanks KingDarBoja is working

People use : npm install [email protected] angularfire2 --save

@sarunint
Copy link
Contributor

Thanks KingDarBoja is working

People use : npm install [email protected] angularfire2 --save

@rogerbobbio Protip: angularfire2 is now @angular/fire. :D

@jamesdaniels
Copy link
Member

Closing in favor of #2619

@jordankkk
Copy link

updated with latest version seem still same

Angular:
10.2.1

Firebase:
8.0.0

AngularFire:
6.0.4

"export 'auth' was not found in 'firebase/app'
"export 'auth' was not found in 'firebase/app'
"export 'firestore' was not found in 'firebase/app'

@KingDarBoja
Copy link
Contributor

With the new version, now you need to export firebase/app as follows:

import firebase from 'firebase/app';

  login() {
    this.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
  }

@sleepinzombie
Copy link

I still have the issue with the latest Angular Fire and Firebase.

Angular:
10.2.1

Firebase:
8.0.0

AngularFire:
6.0.4

PFA the screenshot of the error while serving my app:

Screenshot 2020-11-04 at 9 56 45 PM

@sarunint
Copy link
Contributor

sarunint commented Nov 5, 2020

I still have the issue with the latest Angular Fire and Firebase.

Angular:
10.2.1

Firebase:
8.0.0

AngularFire:
6.0.4

PFA the screenshot of the error while serving my app:

Screenshot 2020-11-04 at 9 56 45 PM

Are you sure that is AngularFire 6.0.4? Seems like 6.0.3 for me.

Did you forget to npm install?

@sleepinzombie
Copy link

@sarunint Actually I managed to solve the issue I was having. My Node was v15. I downgraded to v14 and everything served fine.

@inbatamilan-573
Copy link

same here

@gabriel-arrvda
Copy link

I still have the issue using the 6.04v of the Angular Fire and 7v of Firebase

image

@KingDarBoja
Copy link
Contributor

You need to install firebase v8, not v7, take a look at the compatibility table at https://github.com/angular/angularfire#compatibility

@Awais-mohammad
Copy link

Hello peoples please use version 7 instead of 8 use this npm command and it will work i was also shocked when i got this error but thans to @rogerbobbio and @KingDarBoja
npm install [email protected] angularfire2 --save

@JefferE
Copy link

JefferE commented Nov 19, 2020

This is actually the correct install until this is resolved with new @angularfire:

npm install [email protected] @angular/[email protected] --save

Otherwise 6.0.4 is installed by default and that's broken

@Awais-mohammad
Copy link

@JefferE
I used this and it worked fine with ionic 4 and angular 8
npm install [email protected] angularfire2 --save

@pkmuduli001
Copy link

though it gives some warning but it will solve the issue, try this
npm install [email protected] @angular/[email protected] --save

@Chandra1996
Copy link

i m still getting the error

@Awais-mohammad
Copy link

@Chandra1996 the issue is just due to firebase version uninstall previous version remove it from angular.json then reinstall 7.24.0 version nd ng serve again

@yuvagp
Copy link

yuvagp commented Apr 29, 2022

Hi
I am getting the following error when I try to update my anuglar 12 project to angular13 and firebase to 7
/node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:597:29-40 - Error: export 'SDK_VERSION' (imported as 'SDK_VERSION') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:784:19-31 - Error: export '_getProvider' (imported as '_getProvider') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:3030:6-17 - Error: export 'SDK_VERSION' (imported as 'SDK_VERSION') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12058:7-18 - Error: export 'SDK_VERSION' (imported as 'SDK_VERSION') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12282:7-18 - Error: export 'SDK_VERSION' (imported as 'SDK_VERSION') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12736:2-20 - Error: export '_registerComponent' (imported as '_registerComponent') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12803:2-20 - Error: 0mexport '_registerComponent' (imported as '_registerComponent') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12817:2-17 - Error: export 'registerVersion' (imported as 'registerVersion') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12819:2-17 - Error: export 'registerVersion' (imported as 'registerVersion') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12848:23-29 - Error: export 'getApp' (imported as 'getApp') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/auth-compat/node_modules/@firebase/auth/dist/esm2017/index-7078a255.js:12849:19-31 - Error: export '_getProvider' (imported as '_getProvider') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/database-compat/node_modules/@firebase/database/dist/index.esm2017.js:15528:27-33 - Error: export 'getApp' (imported as 'getApp') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/database-compat/node_modules/@firebase/database/dist/index.esm2017.js:15529:9-21 - Error: export '_getProvider' (imported as '_getProvider') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

./node_modules/@firebase/database-compat/node_modules/@firebase/database/dist/index.esm2017.js:15645:16-29 - Error: export 'SDK_VERSION' (imported as 'SDK_VERSION$1') was not found in '@firebase/app' (possible exports: __esModule, default, firebase)

pls help

@benmatela
Copy link

This package.json should work:

"dependencies": {
"@angular/animations": "~13.2.0",
"@angular/common": "~13.2.0",
"@angular/compiler": "~13.2.0",
"@angular/core": "~13.2.0",
"@angular/fire": "^7.2.1",
"@angular/forms": "~13.2.0",
"@angular/platform-browser": "~13.2.0",
"@angular/platform-browser-dynamic": "~13.2.0",
"@angular/router": "~13.2.0",
"bootstrap": "^5.1.3",
"firebase": "^9.6.7",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.2.3",
"@angular/cli": "~13.2.3",
"@angular/compiler-cli": "~13.2.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.5.2"
}

@Hulliee
Copy link

Hulliee commented Jun 2, 2022

This package.json should work:

"dependencies": { "@angular/animations": "~13.2.0", "@angular/common": "~13.2.0", "@angular/compiler": "~13.2.0", "@angular/core": "~13.2.0", "@angular/fire": "^7.2.1", "@angular/forms": "~13.2.0", "@angular/platform-browser": "~13.2.0", "@angular/platform-browser-dynamic": "~13.2.0", "@angular/router": "~13.2.0", "bootstrap": "^5.1.3", "firebase": "^9.6.7", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~13.2.3", "@angular/cli": "~13.2.3", "@angular/compiler-cli": "~13.2.0", "@types/jasmine": "~3.10.0", "@types/node": "^12.11.1", "jasmine-core": "~4.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", "typescript": "~4.5.2" }

Thank you! This works well with Angular 13

@tayoraph
Copy link

This package.json should work:

"dependencies": { "@angular/animations": "~13.2.0", "@angular/common": "~13.2.0", "@angular/compiler": "~13.2.0", "@angular/core": "~13.2.0", "@angular/fire": "^7.2.1", "@angular/forms": "~13.2.0", "@angular/platform-browser": "~13.2.0", "@angular/platform-browser-dynamic": "~13.2.0", "@angular/router": "~13.2.0", "bootstrap": "^5.1.3", "firebase": "^9.6.7", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~13.2.3", "@angular/cli": "~13.2.3", "@angular/compiler-cli": "~13.2.0", "@types/jasmine": "~3.10.0", "@types/node": "^12.11.1", "jasmine-core": "~4.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", "typescript": "~4.5.2" }

This works for angular 14

@agungss
Copy link

agungss commented Sep 7, 2022

This package.json should work:

"dependencies": { "@angular/animations": "~13.2.0", "@angular/common": "~13.2.0", "@angular/compiler": "~13.2.0", "@angular/core": "~13.2.0", "@angular/fire": "^7.2.1", "@angular/forms": "~13.2.0", "@angular/platform-browser": "~13.2.0", "@angular/platform-browser-dynamic": "~13.2.0", "@angular/router": "~13.2.0", "bootstrap": "^5.1.3", "firebase": "^9.6.7", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/build-angular": "~13.2.3", "@angular/cli": "~13.2.3", "@angular/compiler-cli": "~13.2.0", "@types/jasmine": "~3.10.0", "@types/node": "^12.11.1", "jasmine-core": "~4.0.0", "karma": "~6.3.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.1.0", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "~1.7.0", "typescript": "~4.5.2" }

This works for angular 12 too. Thanks!

@stephanietuerk
Copy link

stephanietuerk commented Feb 5, 2023

Also for Angular 15, the following is working (upgrading from 8 -> 9 solved my issue)

"dependencies": {
  ...other angular deps...
  "@angular/core": "^15.1.2",
  "@angular/fire": "^7.5.0",
  ...other deps...
  "firebase": "^9.17.1", // used `npm install firebase` to bring up to latest version after manually switching to 9
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests