Static GitHub Issues

[133] export 'default' (imported as 'store') was not found in '~store/index.js'

prev: [Enhancement] Handle data() promise errors
next: roadmap?

Thank you for such a great tool!

I'm trying to use vuex store with module files, but am running into the error (v0.9.5):

export 'default' (imported as 'store') was not found in '~store/index.js'

My directory structure looks like:

|— layouts
|  |__ default.vue
|— pages
|  |__ index.vue
|  |__ admin.vue
|— store
|  |__ index.js
|  |__ admin.js

In my store/index.js, I'm trying to simply do:

export const state = { sidebar: false }
export const mutations = {}

And in layout/default.vue:

<template>
  <div>
    <navbar :show="true"/>
    <sidebar :show="$store.state.sidebar"></sidebar>
    <app-main/>
    <footerbar/>
  </div>
</template>

NOTE: I've tried using mapState to get the computed property sidebar as well, to no avail.

I've also copied the example code from your vuex-store-2, but get the same error.

Any thoughts or suggestions?

Thanks again!

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c110">#c110</a>)</em></sub></div>