Home

Issue: 2129

I get TypeError: Cannot assign to read only property 'message' of object '' when performing mutations on a state property.

[issue link]

I’m getting this type error at runtime. I’m not sure what the issue is. It seems to be with webpack. This may be a vuex issue but seems less likely.

The error as is from from console:

vue.runtime.esm.js:654 TypeError: Cannot assign to read only property 'message' of object ''
    at webpackJsonp../.nuxt/client.js.__WEBPACK_IMPORTED_MODULE_6_vue__.default.config.errorHandler (client.js:35)
    at handleError (vue.runtime.esm.js:552)
    at Array.<anonymous> (vue.runtime.esm.js:696)
    at nextTickHandler (vue.runtime.esm.js:641)
    at <anonymous>

Here’s the snippet from my vuex store:

const store = () => new Vuex.Store({
    state: {
        activeTags: []
     },
     mutations: {
          setActiveTag (state, tag) {
               state.activeTags.unshift(tag)
            }
     }
})

Using Nuxt rc-11
and under the hood I see it’s vue: "~2.4.2 and vuex: "^2.4.0"

This bug report is available on Nuxt.js community (#c1888)