Firebaseui-web: Attempted import error: 'app' is not exported from 'firebase/app' (imported as 'firebase')

Created on 28 Oct 2020  路  13Comments  路  Source: firebase/firebaseui-web

[REQUIRED] Describe your environment

  • Operating System version: __WSL2 Ubuntu___
  • Browser version: _Chrome 86.0.4240____
  • Firebase UI version: __4.7.0___
  • Firebase SDK version: _8.0.0____

[REQUIRED] Describe the problem

Attempted import error: 'app' is not exported from 'firebase/app' (imported as 'firebase')

`According to the update log of the firebase SDK (version 8.0.0), the way to import firebase SDK should be`
import firebase from 'firebase/app' 
`instead of `
import * as firebase from 'firebase/app'

Steps to reproduce:

found when importing this package.

Most helpful comment

Error de importaci贸n intentado: 'auth' no se exporta desde 'firebase'
ayuda por favor

First of all I am new but I had the same error, reading a little documentation from the firebase v8 is no longer used

import * as firebase from "firebase/app";
import "firebase/auth";

Currently fix the error with the following
Sorry for my English;

image

All 13 comments

by the way, under my circumstance, I found this little bug when I am upgrading my site to Next.js Version 10, don't know if this happens in other conditions or not.

I installed the firebaseui bundle through yarn and is still having import * as in my esm.js, I already updated to the latest version, what else do I need to do?

Same error on Vue cli ... How can Fix It..

This was a breaking change in the firebase-js-sdk. The fix will be released next week. For now, if you are using firebaseui, you may need to stick with a version older than 8.0.0.

You can also clone the repo and build the binary if you need this urgently.

oh i see, i thought it's included in the latest release, i'll wait for next week :) Thanks!

thanks

This should be now fixed in 4.7.1. Please let us know if you have any issues with this.

Attempted import error: 'auth' is not exported from 'firebase'
help plz

Error de importaci贸n intentado: 'auth' no se exporta desde 'firebase'
ayuda por favor

First of all I am new but I had the same error, reading a little documentation from the firebase v8 is no longer used

import * as firebase from "firebase/app";
import "firebase/auth";

Currently fix the error with the following
Sorry for my English;

image

[REQUIRED] Describe your environment

  • Operating System version: WSL2 Ubuntu_
  • Browser version: _Chrome 86.0.4240____
  • Firebase UI version: 4.7.0_
  • Firebase SDK version: _8.0.0____

[REQUIRED] Describe the problem

Attempted import error: 'app' is not exported from 'firebase/app' (imported as 'firebase')

`According to the update log of the firebase SDK (version 8.0.0), the way to import firebase SDK should be`
import firebase from 'firebase/app' 
`instead of `
import * as firebase from 'firebase/app'

Steps to reproduce:

found when importing this package.

import firebase from "firebase/app";
import "firebase/performance";
import "firebase/firestore";
import "firebase/auth";

const fireConfig = {
   ....
};

if (!firebase.apps.length) {
  firebase.initializeApp(fireConfig);
}

export const perf = firebase.performance();
export const auth = firebase.auth();
export const db = firebase.firestore();
export default firebase;

I did the same thing as mentioned, but no change same error received.
./src/App.js Attempted import error: 'auth' is not exported from 'firebase'.

firebase --version 9.8.0
firebase tools --version 9.8..0

can you help me pls.

[REQUIRED] Describe your environment

  • Operating System version: WSL2 Ubuntu_
  • Browser version: _Chrome 86.0.4240____
  • Firebase UI version: 4.7.0_
  • Firebase SDK version: _8.0.0____

[REQUIRED] Describe the problem

Attempted import error: 'app' is not exported from 'firebase/app' (imported as 'firebase')

`According to the update log of the firebase SDK (version 8.0.0), the way to import firebase SDK should be`
import firebase from 'firebase/app' 
`instead of `
import * as firebase from 'firebase/app'

Steps to reproduce:

found when importing this package.

import firebase from "firebase/app";
import "firebase/performance";
import "firebase/firestore";
import "firebase/auth";

const fireConfig = {
   ....
};

if (!firebase.apps.length) {
  firebase.initializeApp(fireConfig);
}

export const perf = firebase.performance();
export const auth = firebase.auth();
export const db = firebase.firestore();
export default firebase;

I did the same thing as mentioned, but no change same error received.
./src/App.js Attempted import error: 'auth' is not exported from 'firebase'.

firebase --version 9.8.0
firebase tools --version 9.8..0

can you help me pls.

Did you solved it? I am having the same issue

having same issue with firebase 9.0.0-beta.1
"Attempted import error: 'firebase/app' does not contain a default export (imported as 'firebase')."

when I try to import firebaseui/dist/firebaseui I get the following import:
image

Was this page helpful?
0 / 5 - 0 ratings