i18n: Missing i18n options file with `npm run generate`
Environment
- Operating System: Linux
- Node Version: v16.14.2
- Nuxt Version: 3.4.1
- Nitro Version: 2.3.3
- Package Manager: npm@7.17.0
- Builder: vite
- User Config: modules, i18n
- Runtime Modules: @nuxtjs/i18n-edge@8.0.0-beta.11-28023078.39cf21b
- Build Modules: -
Reproduction
https://stackblitz.com/edit/github-6ylvpz
run npm i && npm run generate && serve .output/public
Describe the bug
When the nuxt project is built with npm run generate the generated build will crash and throw error 500 with error message format is not defined. When you check the network tab in the developer tools you will see that the i18n-config-[hash].js file will not exist status 404 is returned.
Additional context
No response
Logs
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 5
- Comments: 29 (1 by maintainers)
I’m working on this issue.
The reason is taking a little time is because our main day job DEADLINE, is coming up at the end of this month.
Please assured that this issue is not being ignored at all and wait. 🙏
Still should be seen as a workaround. Default should run out of the box without messing with those rights (imho).
Workaround: Roll back to v8.0.0-beta.10 (which requires to revert the config file change to an object notation). Once it’s fixed, the config file can be used again.
Still there seems to be a problem with
nuxt generate. The config file does not end up in the build. Please check the reproduction instructions. However, I also noticed that withnuxt buildthere was also a 404 client side for this file. But the website did not crash. It looks like resolving this server side works fine, but there is something wrong client side.I am also facing this issue with the latest beta version (12) Here is the relevant logs from my vercel deployment:
This is also happening to me when I try to deploy to Vercel.
When I run
nuxt buildlocally, the .nuxt/i18n folder and the config file aren’t automatically generated until I refresh my browser.Here is my .nuxt folder after running
nuxt build:And here it is again after I run the build server using
node .output/server/index.mjsand refreshing localhost:But in Vercel it just crashes beforehand since it can’t find the config file:
See here: https://stackblitz.com/edit/github-cr1uk5-mr8fcr?file=package.json Thanks!
I’m getting a different error now when I try to build the project with
npx nuxi generate:I’ve fixed this issue. Please check edge channel 8.0.0-beta.11-28059008.d1499b6 version. Thanks!
We have the same problem. It seems to be new in beta11 since beta10 doesn’t have that problem (However it has another problem).