Skip to content

Vuex-persist throws Uncaught TypeError: s is not a function

Here is my code: I don’t know exactly what the problem is, maybe someone knows how to fix it!

const vuexLocal = new window.VuexPersistence.VuexPersistence({
    storage: window.localStorage,
const visits = {
    state: {
        visit: []
    mutations: {
        addVisit(state, data) {
                    "id": data["id"],
                    "full_name": data["full_name"],
                    "entranceweight": data["entranceweight"],
                    "dispatched": data["dispatched"],
                    "vehicletype": data["vehicletype"],
const visitStore = new Vuex.Store({

    modules: {
        visit: visits,

    plugins: [ vuexLocal.plugin, ]

it says Uncaught TypeError: s is not a function | vuex-persist.js 1:657


I ran into a similar issue recently as well. It seems to me that the newest build is unstable and is causing this issue. If you’re updating directly in browser, you’ll need to import the last stable version.

<script src=""></script>
<script src=""></script>

I’ve also submitted the issue to the repo, but this was a way to get around it for now.