Vuefire: vuexfire/SET_VALUE [vuex] unknown mutation type

Created on 8 Apr 2019  Â·  7Comments  Â·  Source: vuejs/vuefire

I did upgrade vuex from 3.0.1 to 3.1.0 and vuexfire from 3.0.0-alpha.10 to 3.0.0-alpha.15.

Now, I have this error on my app : [vuex] unknown mutation type: vuexfire/SET_VALUE

I use namespace with the store and I have the : mutations: {
...firebaseMutations

in the main store.

Any help would be appreciated.

Thank you

Most helpful comment

@posva
My mistake, i did not add the mutations to root store. Now, it works fine. thank you.

All 7 comments

Please check the changelog, it was renamed

Yes, Thank you, I did all the renames from the Breaking Changes from the ChangeLog. Now it works fine. Thank you.

Hi, same problems. @konato , @posva
package.json

...
"vuex": "^3.1.0",
"vuexfire": "^3.0.0-alpha.15"

stores/songs.js

import { firestoreAction } from 'vuexfire'
import {firebase, db} from '../plugins/firebase'

export const state = () => {
  return {
    songs: []
  }
}

export const actions = {
    setSongsRef: firestoreAction( ({ bindFirestoreRef }, ref) => {
    return bindFirestoreRef('songs', db.collection('Songs'))
  }),
}

App.vue

...
created(){
this.$store.dispatch('songs/setSongsRef')
}

error logs

[vuex] unknown mutation type: vuexfire/SET_VALUE
[vuex] unknown mutation type: vuexfire/ARRAY_ADD

Any help would be appreciated.

Thanks @posva
I deleted node_modules and reinstalled :

yarn add vuexfire@next
yarn add vuefire@next

package.json

"dependencies": {
    "firebase": "^5.9.3",
    "md5-hex": "^2.0.0",
    "nuxt": "^2.0.0",
    "nuxt-buefy": "^0.3.4",
    "vee-validate": "^2.2.0",
    "vue": "^2.6.10",
    "vuefire": "^2.0.0-alpha.21",
    "vuex": "^3.1.0",
    "vuexfire": "^3.0.0-alpha.15"
  },

but still errors.

Please follow the documentation I sent you...

BTW, you don't need vuefire and vuexfire. Using one is usually enough

On Tue, Apr 9, 2019 at 12:30 PM cafe4it notifications@github.com wrote:

Thanks @posva https://github.com/posva
I deleted node_modules and reinstalled :

yarn
yarn add vuexfire@next
yarn add vuefire@next

package.json

"dependencies": {
"firebase": "^5.9.3",
"md5-hex": "^2.0.0",
"nuxt": "^2.0.0",
"nuxt-buefy": "^0.3.4",
"vee-validate": "^2.2.0",
"vue": "^2.6.10",
"vuefire": "^2.0.0-alpha.21",
"vuex": "^3.1.0",
"vuexfire": "^3.0.0-alpha.15"
},

but still errors.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vuefire/issues/258#issuecomment-481196190, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAoicXScBIP6hMMus_qDf0n2VUGBayzZks5vfGu0gaJpZM4ch-nt
.

--
Eduardo San Martin Morote

@posva
My mistake, i did not add the mutations to root store. Now, it works fine. thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JFGHT picture JFGHT  Â·  5Comments

patrikengborg picture patrikengborg  Â·  4Comments

dev-kr2020 picture dev-kr2020  Â·  4Comments

torfeld6 picture torfeld6  Â·  4Comments

mkharibalaji picture mkharibalaji  Â·  3Comments