原因
バージョンアップで使い方が変わった(この記事を書いている時点でvuexfire 3.0.0-alpha.18)
vuexfire:firebaseMutationsの名前をvuexfireMutationsに変更しました。 RTDBの使用も許可したいのでfirebaseActionをfirestoreActionに変更し、その名前をfirebaseActionにも使用します。
原文: vuexfire: Rename firebaseMutations into vuexfireMutations. Rename firebaseAction into firestoreAction since we want to allow using RTDB as well and that name will be used for the firebaseAction as well
引用
しかも https://github.com/posva/vuexfire は途中から https://github.com/vuejs/vuefire/tree/master/packages/vuexfire に写ったため、古い方のREADMEを参考にして使おうとすると駄目。ちゃんと新しい方のREADMEを参考にしよう。
対処法
Firestoreを使っているとして、importするモジュールを下記に変更
- import { firebaseAction, firebaseMutations } from 'vuexfire'
+ import { firestoreAction, vuexfireMutations } from 'vuexfire'