Attempted import error: 'FetchXmlHttpFactory' is not exported from '@firebase/webchannel-wrapper' (imported as 'v')

Viewed 193

I have linked my firebase to my project in order to use it for Google auth, but this problem keeps pop out.

import firebase from "firebase/app";

import "firebase/firestore";
import "firebase/auth";

const config = {
  apiKey: "************************",
  authDomain: "********************",
  projectId: "****************",
  storageBucket: "***********************,
  messagingSenderId: "*************************",
  appId: "******************************",
  measurementId: "******************",
};

firebase.initializeApp(config);

export const auth = firebase.auth();
export const firestore = firebase.firestore();

const provider = new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({ prompt: "select_account" });
export const signInWithGoogle = () => auth.signInWithPopup(provider);

export default firebase;

2 Answers

Just figured out the issue check in your package.json file to see what version of firebase you're using. If you have firebase version: 8.6.4, uninstall using npm uninstall firebase. Then reinstall using npm install firebase@8.6.3

Hi i also got this error its not the error in your code but rather dependency. The firebase package just got updated to 8.6.4 check if this version is installed and if that's the case then downgrade it to firebase@8.6.3 this is stable and worked for me.

Related