0

How can i use firebase.database()?

I have an PWA (Progressive Web App) and i import all modules of firebase: (firebase@9.6.0) import * as firebase from “firebase/app” import “firebase/auth” import “firebase/database” I have an error when I use: const ref = firebase.database().ref(); Error: The module database does not exists. How can I do?

20th Dec 2021, 8:00 PM
Lisandro Musca
Lisandro Musca - avatar
1 Antwort
0
If you added firebase via script tags, it needs to be of type module. See the docs: https://firebase.google.com/docs/web/alt-setup
25th Dec 2021, 10:45 PM
Marcel Weber
Marcel Weber - avatar