No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Problem importing Firebase (export 'default' was not found in 'firebase')

    Help
    3
    3
    7557
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      Fabrunet last edited by

      Hi,
      Using a fresh PWA starter kit, I install Firebase following this tutorial.

      It used to work with previous projects (2 weeks ago), but now 'import Firebase from ‘firebase’ returns an error : export ‘default’ (imported as ‘Firebase’) was not found in 'firebase’.

      I tried the same code inside a fresh vue-webpack-boilerplate and no bugs, it works. So I’m thinking maybe a conflict with another component inside the Quasar starter kit?

      1 Reply Last reply Reply Quote 1
      • P
        pmooredesigner last edited by pmooredesigner

        Hi, I don’t use the PWA starter, but I did have some issues myself importing firebase into Quasar when I started. I can’t say I know the best way to do this, but I currently use the following, and it works for me:

        import firebase from 'firebase/app';
        import "firebase/auth";
        import "firebase/firestore";
        import "firebase/storage";
        
        const config = { stuff };
        
        firebase.initializeApp(config);
        
        const auth = firebase.auth();
        const firestore = firebase.firestore();
        const storage = firebase.storage();
        
        export {firebase, auth, firestore, storage};
        

        And, then I import the pieces I need like this:

        import { firebase, auth, firestore, storage } from './firebase.js';
        
        A 1 Reply Last reply Reply Quote 4
        • A
          avistad @pmooredesigner last edited by

          @pmooredesigner Thanks for this answer. I had a similar predicament myself

          1 Reply Last reply Reply Quote 0
          • First post
            Last post