You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest nuxt-3vuex and nuxt version 3.8.1 generate the error below.
I think there is a problem with the multiple versions of @nuxt/kit present in my yarn.lock, but maybe I'm not the only one encountering this problem?
yarn run v1.22.19
$ nuxi dev ui
Nuxt 3.8.1 with Nitro 2.7.2 17:08:31
17:08:31
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
ERROR Cannot start nuxt: Cannot read properties of undefined (reading 'sync') 17:08:32
at Object.vuexStores (node_modules/nuxt3-vuex-module/src/module.js:40:48)
at setup (node_modules/nuxt3-vuex-module/src/module.js:99:16)
at normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:2141:38)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2439:95)
at async initNuxt (node_modules/nuxt/dist/index.mjs:3696:7)
at async NuxtDevServer._load (node_modules/nuxi/dist/chunks/dev2.mjs:255:5)
at async NuxtDevServer.load (node_modules/nuxi/dist/chunks/dev2.mjs:187:7)
at async NuxtDevServer.init (node_modules/nuxi/dist/chunks/dev2.mjs:182:5)
at async Object.run (node_modules/nuxi/dist/chunks/dev-child.mjs:103:5)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.c6444792.mjs:1647:7)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.c6444792.mjs:1638:11)
at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.c6444792.mjs:1770:7)
Solution
By replacing glob with fast-glob import in the module.js file, the error is no longer present and the program can continue.
GitHub Patch
index 6db7a0c..cb97078 100644
--- a/node_modules/nuxt3-vuex-module/src/module.js+++ b/node_modules/nuxt3-vuex-module/src/module.js@@ -1,7 +1,7 @@
import { existsSync } from 'fs'
import { resolve } from 'path'
import { defineNuxtModule, addPlugin, addImports, addTemplate, createResolver } from '@nuxt/kit'
-import glob from 'glob'+import glob from 'fast-glob'
function addModule (storeModule, namespaces, alias) {
if (!namespaces.length) {
diff --git a/package.json b/package.json
index c4fe8a0..482a86f 100644
--- a/package.json+++ b/package.json@@ -22,7 +22,7 @@
},
"devDependencies": {
"@types/mocha": "^9.1.1",
- "glob": "^8.0.3",+ "fast-glob": "^3.3.0",
"nuxt": "^3.0.0"
}
}
The text was updated successfully, but these errors were encountered:
Problem
Using the latest nuxt-3vuex and nuxt version 3.8.1 generate the error below.
I think there is a problem with the multiple versions of @nuxt/kit present in my yarn.lock, but maybe I'm not the only one encountering this problem?
Solution
By replacing
glob
withfast-glob
import in the module.js file, the error is no longer present and the program can continue.GitHub Patch
The text was updated successfully, but these errors were encountered: