This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
ReferenceError: Cannot access 'module' before initialization #248
Labels
bug
Something isn't working
Versions
nuxt-vite: 0.3.5
nuxt: 2.15.3
Reproduction
package.json:
"dependencies": {
"@nuxtjs/auth-next": "5.0.0-1618898588.9655d0e",
"@nuxtjs/axios": "^5.13.1",
"@nuxtjs/markdownit": "^2.0.0",
"@nuxtjs/sentry": "^5.1.7",
"core-js": "^3.9.1",
"fabric-history": "^1.6.0",
"fabric-with-gestures": "^4.5.0",
"fontfaceobserver": "^2.1.0",
"lru-cache": "^6.0.0",
"markdown-it-attrs": "^2.4.1",
"markdown-it-block-embed": "0.0.3",
"markdown-it-collapsible": "^1.0.0",
"markdown-it-div": "^1.1.0",
"markdown-it-link-attributes": "^4.0.0",
"markdown-it-video": "^0.6.3",
"mitt": "^3.0.0",
"nuxt": "^2.15.3",
"nuxt-i18n": "^6.26.0",
"nuxt-interpolation": "^0.2.3",
"portal-vue": "^2.1.7",
"reclameland-shared": "^1.0.170",
"v-click-outside": "^3.1.2",
"v-tooltip": "^2.1.3",
"vue-color": "^2.8.1",
"vue-frag": "^1.3.1",
"vue-multiselect": "^2.1.6",
"vue-toastification": "^1.7.14",
"vuex-persistedstate": "^4.1.0"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^6.0.0",
"@nuxtjs/eslint-module": "^3.0.2",
"@nuxtjs/google-fonts": "^1.3.0",
"@nuxtjs/tailwindcss": "^4.2.1",
"autoprefixer": "^9.8.6",
"babel-eslint": "^10.1.0",
"eslint": "^7.22.0",
"eslint-plugin-nuxt": "^2.0.0",
"eslint-plugin-vue": "^7.7.0",
"nuxt-vite": "^0.3.5",
"postcss": "^7.0.39"
}
nuxt.config.js:
plugins: [
{ src: '
/plugins/mitt.js', mode: 'client' },/plugins/persisted-state.js', mode: 'client' },{ src: '
{ src: '
/plugins/vue-tooltip.js', mode: 'client' },/plugins/vue-fragment.js','
'
/plugins/currency.js',/plugins/axios.js''
],
buildModules: [
'nuxt-vite',
'@nuxtjs/eslint-module',
'@nuxtjs/tailwindcss',
'@nuxtjs/google-fonts',
'reclameland-shared/nuxt'
],
modules: [
'@nuxtjs/axios',
'@nuxtjs/auth-next',
'@nuxtjs/markdownit',
'nuxt-i18n',
'nuxt-interpolation',
'portal-vue/nuxt',
'vue-toastification/nuxt'
],
i18n: {
baseUrl: process.env.BASE_URL,
defaultLocale: 'nl',
strategy: 'no_prefix',
locales: [
{
code: 'nl',
iso: 'nl-NL'
},
{
code: 'be',
iso: 'nl-BE'
}
],
vueI18n: {
fallbackLocale: 'nl',
messages: {
nl: {
...require('./node_modules/reclameland-shared/locales/rcl/nl-NL.json'),
...require('./node_modules/reclameland-shared/locales/main.json')
},
be: {
...require('./node_modules/reclameland-shared/locales/rcl/nl-BE.json'),
...require('./node_modules/reclameland-shared/locales/main.json')
}
}
}
},
Description
After building, I'm getting an error "ReferenceError Cannot access 'module' before initialization". This only happens when I use nuxt-vite, not when using webpack. What could be the cause?
The text was updated successfully, but these errors were encountered: