vuejs / vuefire

🔥 Firebase bindings for Vue.js
https://vuefire.vuejs.org
MIT License
3.86k stars 333 forks source link

App startup failure with VueFire plugin #286

Closed calirails closed 5 years ago

calirails commented 5 years ago

I've started this Vue (version 2.6.10) web app to follow along this Quill tutorial that uses the vuefire plugin for Firebase realtime document syncing suppport. As soon as I add the import and register the plugin,I get the following error emanating from the main.ts file. Uncaught TypeError: Cannot read property 'install' of undefined at Function.Vue.use (vue.runtime.esm.js?2b0e:5100) at eval (main.ts?bc82:9) at Module../src/main.ts (app.js:3317) at __webpack_require__ (app.js:767) at fn (app.js:130) at Object.1 (app.js:3403) at __webpack_require__ (app.js:767) at app.js:902 at app.js:905

My repo is a bare bones project and can be cloned from: https://github.com/calirails/wysiwyg-quill

I searched web and scanned existing issues and came across this [reported issue] (https://github.com/vuejs/vuefire/issues/273) that was open-ended, and claimed to have been resolved by moving the import statement for vuefire right after the import of Vue itself; however, that didn't resolve my error.

posva commented 5 years ago

Hey, that tutorial is outdated. We have a documentation https://vuefire.vuejs.org where you can check how to get started

rwardanjan commented 5 years ago

Hey, that tutorial is outdated. We have a documentation https://vuefire.vuejs.org where you can check how to get started

Hello Posva the bug is still not fixed. "export 'default' (imported as 'firestorePlugin') was not found in 'vuefire'

posva commented 5 years ago

There is no bug, please read the docs: https://vuefire.vuejs.org/vuefire/getting-started.html#plugin, there is no default export in Vuefire anymore

import { firestorePlugin } from 'vuefire'
rwardanjan commented 5 years ago

There is no bug, please read the docs: https://vuefire.vuejs.org/vuefire/getting-started.html#plugin, there is no default export in Vuefire anymore

import { firestorePlugin } from 'vuefire'

Thanks! This worked for me

calirails commented 5 years ago

Thanks @posva! Confirmed that I can successfully import both the RTDB (Firebase) as well as the firestorePlugin (Firestore) using that VueFire guide.