question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

[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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:27
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
abhishekpatel946commented, Apr 1, 2021

[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.

6reactions
DarwinSantoscommented, Mar 5, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade to Firebase JS 8.0.0: Attempted import error: 'app' is ...
Attempted import error : 'initializeApp' is not exported from 'firebase/app' (imported as 'firebase'). My import looks like this: import * as ...
Read more >
[Solved] Attempted import error: 'firebase/app' does not ...
To Solve Attempted import error: 'firebase/app' does not contain a default export (imported as 'firebase') Error If You are using Version 9 then ......
Read more >
Attempted import error: 'auth' is not exported from 'f...
If you got this error: Attempted import error: 'auth' is not exported from 'firebase/app'. try this import: import firebase from ...
Read more >
[Solved]-How do I fix a Firebase 9.0 import error? "Attempted ...
[Solved]-How do I fix a Firebase 9.0 import error? "Attempted import error: 'firebase/app' does not contain a default export (imported as 'firebase')."-Reactjs.
Read more >
[Problem Solving] ./src/firebase.js Attempted import error ...
[Problem Solving] ./src/firebase.js Attempted import error: 'firebase/app' does not contain a default export (imported as 'firebase').
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found