Have you initialized firebase?
import * as firebase from "firebase/app"; import "firebase/analytics"; const firebaseConfig = { apiKey: "xxx", // ... }; firebase.initializeApp(firebaseConfig); firebase.analytics();
Yes. Error comes on the second line with :
import "firebase/analytics";
Can you share a project where this works ?
I updated the setup section with step by step commands to setup vue app. I executed it step by step and checked that it works. Let me know if it works for you.
Sorry, I still have the same problem importing firebase/analytics
if you have time to check : github.com/tibetoine/friends-party
Please follow updated setup section from the beginning. I added also versions and package.json for comparison.
In your project you only need to update firebase version, the one you use is too old and doesn't have analytics. Go to package.json and update it to:
"firebase": "^7.9.1",
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Have you initialized firebase?
Yes. Error comes on the second line with :
Can you share a project where this works ?
I updated the setup section with step by step commands to setup vue app. I executed it step by step and checked that it works. Let me know if it works for you.
Sorry,
I still have the same problem importing firebase/analytics
if you have time to check : github.com/tibetoine/friends-party
Please follow updated setup section from the beginning. I added also versions and package.json for comparison.
In your project you only need to update firebase version, the one you use is too old and doesn't have analytics. Go to package.json and update it to: