Skip to content

Uncaught Error: [vuex] getters should be function but "getters.countermod/counter" in module "dummylib" is 1. #1748

@bitquality

Description

@bitquality

Version

3.4.0

Reproduction link

https://new-issue.vuejs.org/?repo=vuejs/vuex

Steps to reproduce

I get the following error while i try to import the plugin component with vuex modules in another vue project.

Uncaught Error: [vuex] getters should be function but "getters.countermod/counter" in module "dummylib" is 1.
Following is my plugin code with vuex modules
    //mystore/mod1/index.ts:

    import { actions } from "./actions"
    import { getters } from "./getters"
    import { mutations } from "./mutations"
    import { state } from "./state"

    export default {
      state,
      mutations,
      getters,
      actions
    }

    //mystore/index.js:

    import Vue from 'vue';
    import Vuex from 'vuex';
    import countermod  from './countermod';


    Vue.use(Vuex);

    export default new Vuex.Store({
      modules: {
        countermod
      },
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions