Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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')
like image 364
A.lex Avatar asked Dec 03 '22 10:12

A.lex


1 Answers

Older documentation I think. Try this instead.

import { firestorePlugin } from 'vuefire'
Vue.use(firestorePlugin)
like image 61
skribe Avatar answered Jan 18 '23 23:01

skribe