gatsby-packages icon indicating copy to clipboard operation
gatsby-packages copied to clipboard

Breaking change in Firebase ^9.0.2 (Solution)

Open mattandryc opened this issue 4 years ago • 2 comments

In the latest version of firebase (^9.0.2), there's no default export in "firebase/app".

You can get this working by modifying the import in gatsby-plugin-firebase/src/firebase.js as follows:

import firebase from "firebase/app"; → import firebase from "firebase/compat/app";

mattandryc avatar Sep 10 '21 23:09 mattandryc

Is there a reason why there hasn't been any PR to fix this? I feel like it isn't right to modify files found inside the node_modules folder.

This solution also fails to account for when npm install is run on a different machine such as CICD. The code would be overwritten and go back to its original state.

simply-alliv avatar Oct 07 '21 21:10 simply-alliv

Now Firebase version 10 has completely changed things...for the better. Will the gatsby-plugin-firebase be updated to implement this to take advantage of the upgrade?

linoxyn avatar Nov 18 '21 21:11 linoxyn