firebasevuejs2vuefire

export 'default' (imported as 'VueFire') was not found in 'vuefire'


Every single tutorial for how to use Firebase with Vue says that in the main.js file I have to add Vue.use(VueFire); which makes sense. But then I just get this message export 'default' (imported as 'VueFire') was not found in 'vuefire'.

I tried using import * as VueFire from 'vuefire' and it didn't give the error message anymore, but it doesn't seem to be using the plugin.

this is the main.js file

import Vue from 'vue'
import App from './App.vue'
import router from './router'

import VueFire from 'vuefire'

Vue.config.productionTip = false

Vue.use(VueFire);

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

Solution

  • Older documentation I think. Try this instead.

    import { firestorePlugin } from 'vuefire'
    Vue.use(firestorePlugin)