Vuex-persistedstate: Error Uncaught TypeError: Converting circular structure to JSON

Created on 20 Jul 2017  路  6Comments  路  Source: robinvdvleuten/vuex-persistedstate

Using the basic example I am getting a circular structure error
I suspect the actual issue is elsewhere but I don't know where to look.

```// VUEX

import Vuex from 'vuex';
import createPersistedState from 'vuex-persistedstate'

// Added Modules
import auth from './modules/auth';
import site from './modules/site';

const store = new Vuex.Store({
modules: {
auth,
site
},
state: {},
plugins: [createPersistedState()]
});

export default store;
```

Most helpful comment

I was having this error, I was importing the lib like that:

plugins: [createPersistedState()],

I changed to:

plugins: [createPersistedState],

and it worked!!

All 6 comments

@DelfsEngineering please provide some more context of your JSON structure. Without any knowledge on how your modules look like, it's a very hard issue to solve.

No update by @DelfsEngineering on the issue. Please see the jsfiddle links in the readme for a basic running example of the plugin.

image
crashes it too

I was having this error, I was importing the lib like that:

plugins: [createPersistedState()],

I changed to:

plugins: [createPersistedState],

and it worked!!

It seems that it is caused by the matched attribute of vue-router. See how the author can improve it. The framework used is vue-element-admin. You can clone to see the error message; @robinvdvleuten @

No update by @DelfsEngineering on the issue. Please see the jsfiddle links in the readme for a basic running example of the plugin.

It seems that it is caused by the matched attribute of vue-router. See how the author can improve it. The framework used is vue-element-admin. You can clone to see the error message;

Was this page helpful?
0 / 5 - 0 ratings

Related issues

usu-blog picture usu-blog  路  3Comments

kylewelsby picture kylewelsby  路  5Comments

chadwtaylor picture chadwtaylor  路  5Comments

joefresco picture joefresco  路  6Comments

rootsli picture rootsli  路  5Comments