I got the npm "firebase" package for Node, made a firebaseConfig.js file and then added this:
const firebase = require("firebase/app");
console.log(firebase);
const firebaseConfig = {
...
};
firebase.initializeApp(firebaseConfig);
At first, I got an error saying "initializeApp isn't a function", which I really didn't get, after seeing the contents of firebase
, I changed the last line to
firebase.default.initializeApp(firebaseConfig);
Which works, but now I'm getting this warning on the console;
Warning: This is a browser-targeted Firebase bundle but it appears it is being
run in a Node environment. If running in a Node environment, make sure you
are using the bundle specified by the "main" field in package.json.
I really don't get what I should do here, I could really use some guidance so thanks a lot in advance!