title: Firebase Module not found: Can't resolve '../firebase' in '/vercel/path0/components' during deployment
body: <p>I was trying to deploy my application that uses firebase on Vercel. But it gives `Module not found: Can't resolve '../firebase' in '/vercel/path0/components', in development this works.</p>
  <p>My firebase.js</p>
  <pre><code>import firebase from &quot;firebase/compat/app&quot;;
  import &quot;firebase/compat/auth&quot;;
  import &quot;firebase/compat/firestore&quot;;
  
  const firebaseConfig = {
    apiKey: process.env.NEXT_PUBLIC_API_KEY,
    authDomain: process.env.NEXT_PUBLIC_AUTH_DOMAIN,
    projectId: process.env.NEXT_PUBLIC_PROJECTID,
    storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET,
    messagingSenderId: process.env.NEXT_PUBLIC_MESSAGING_SENDER_ID,
    appId: process.env.NEXT_PUBLIC_APP_ID,
    measurementId: process.env.NEXT_PUBLIC_MEASUREMENT_ID,
  };
  
  const app = !firebase.apps.length
    ? firebase.initializeApp(firebaseConfig)
    : firebase.app();
  const db = app.firestore();
  const auth = app.auth();
  const provider = new firebase.auth.GoogleAuthProvider();
  
  export { auth, db, provider };
  </code></pre>
  <p>I am import <code>auth, db and provider</code> where ever I want to use them.
  Here is one of the file where this error occurs.</p>
  <pre><code>import { auth } from &quot;../firebase&quot;;
  
  const Sidebar = () =&gt; {
    const [user] = useAuthState(auth);
  </code></pre>
  <p>I guess the error is at <code>import { auth } from &quot;../firebase&quot;;</code> part.
  Is there any way to fix this? Help would be appreciated.</p>