Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

249
Views
export 'default' (imported as 'db') was not found in './firebase' (possible exports: auth, db, storage)

So I am fairly new to this but I am watching a tutorial on setting up firebase for a react app. followed the code exactly and I still cannot get it to work. any pointer would help tremendously. thanks.

this is my firebase.js file

import firebase from "firebase";

  const firebaseApp = firebase.initializeApp({
    apiKey: "AIzaSyA4iXlWakrCkRZhZnF24w0oDOhg8tuHZwM",
    authDomain: "ig-clone-53312.firebaseapp.com",
    projectId: "ig-clone-53312",
    storageBucket: "ig-clone-53312.appspot.com",
    messagingSenderId: "975520243361",
    appId: "1:975520243361:web:18160e292d3b21d8fe1ae0"
  });

  const db = firebaseApp.firestore();
  const auth = firebase.auth();
  const storage = firebase.storage();

  export { db, auth, storage }; 


this is the app.js file that I'm trying to import it into.

import { db, auth, storage} from './firebase';
import React, { useState, useEffect } from 'react';
import './App.css';
import Post from './Post'




function App() {
  const [post, setPosts] = useState([]);
  

  useEffect(() => {
    db.collection('posts').onSnapshot(snapshot => {
      setPosts(snapshot.docs.map(doc => doc.data()));
    })
  }, [])

    return (
    <div className="app">
     <div className="app__header" >
       <img className="app__headerImage" src="https://www.instagram.com/static/images/web/mobile_nav_type_logo.png/735145cfe0a4.png" alt="" />
     
       
     </div>
     
    {
      post.map(post => (
        <Post username={post.username} caption={post.caption} imageUrl={post.imageUrl}/>
      ))
    }
     
      <Post username={post.username} caption={post.caption} imageUrl={post.imageUrl} />
      <Post username={post.username} caption={post.caption} imageUrl={post.imageUrl}/>
      <Post />
      
    </div>
  );
}

export default App;

i am also receiving this error

Module not found: Error: Package path . is not exported from package C:\Users\Kyle\Desktop\instagram-clone\ig-clone\node_modules\firebase (see exports field in C:\Users\Kyle\Desktop\instagram-clone\ig-clone\node_modules\firebase\package.json) Did you mean './firebase'?

any advice?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!