[Vuejs]-Unresolved variable $firebaseRefs vue js

0๐Ÿ‘

โœ…

As explained in the vuefire documentation, you need to install Vuefire as a Vue plugin. Therefore, since you use the Realtime Database, you need to adapt your main.js file as follows

import Vue from 'vue'
import App from './App.vue'
import router from "./routes/route.js";
import store from "./store";
import { rtdbPlugin } from 'vuefire'

Vue.use(rtdbPlugin)
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')

Do not forget to install the latest version of Vuefire as follows (see doc):

npm install vuefire

Leave a comment