Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

nuxt-vite fails to compile if 'store' directory is absent #35

Closed
nathanchase opened this issue Feb 27, 2021 · 1 comment
Closed

nuxt-vite fails to compile if 'store' directory is absent #35

nathanchase opened this issue Feb 27, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@nathanchase
Copy link

If you use a minimal repo and the store directory is missing for whatever reason, nuxt-vite will throw an error when running yarn dev. It works fine if you create the store directory and add an index.js to it.

Perhaps the solution is that there just needs a way for nuxt+vite to function without a Vuex store being present?

 ERROR  Could not compile template /home/vitetest/node_modules/nuxt-vite/templates/store.js: storeModules is not defined                    09:02:01

  at node_modules/@nuxt/builder/dist/builder.js:723:17
  at async Promise.all (index 0)
  at async Builder.compileTemplates (node_modules/@nuxt/builder/dist/builder.js:701:5)
  at async Builder.generateRoutesAndFiles (node_modules/@nuxt/builder/dist/builder.js:388:5)
  at async Builder.build (node_modules/@nuxt/builder/dist/builder.js:319:5)
  at async Object._buildDev (node_modules/@nuxt/cli/dist/cli-dev.js:107:5)
  at async Object.startDev (node_modules/@nuxt/cli/dist/cli-dev.js:65:7)
  at async Object.run (node_modules/@nuxt/cli/dist/cli-dev.js:52:5)
  at async NuxtCommand.run (node_modules/@nuxt/cli/dist/cli-index.js:413:7)

Versions

nuxt-vite: 0.0.9
nuxt: 2.15.2

Reproduction

https://github.com/nathanchase/vitetest

@nathanchase nathanchase added the bug Something isn't working label Feb 27, 2021
@nathanchase nathanchase changed the title nuxt-vite fails to build if 'store' directory is absent nuxt-vite fails to compile if 'store' directory is absent Feb 27, 2021
@pi0
Copy link
Member

pi0 commented Feb 27, 2021

fixed in 0.0.12 (0e7c3ae + e6a5272)

@pi0 pi0 closed this as completed Feb 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants