1

Everything works fine until I install "npm install react-transition-group --save". Then somehow I got this "TypeError: Cannot read property 'initializeApp' of undefined" error.

Very similar to this post, but I still can't get it to work.

I also tried reinstall all the package, didn't work as well.

The error I got.

Here is my firebase config file.

import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/storage';

const firebaseConfig = {
  apiKey: "XXX",
  authDomain: "XXX",
  projectId: "XXX",
  storageBucket: "XXX",
  messagingSenderId: "XXX",
  appId: "XXX"
}

firebase.initializeApp(firebaseConfig);

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

Does anyone know what went wrong? Thanks a lot for any help!

Bryce Chan
  • 1,639
  • 11
  • 26

1 Answers1

1

I have already solved the issues, it is due to after ruining "npm audit-force", it changed some of the packages' version in the package.json. After I compared the version numbers from the github repository, and changed them to the correct version, then run npm install. It solved the problem.

Bryce Chan
  • 1,639
  • 11
  • 26