-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing i18n options file with npm run generate
#1990
Comments
When you try to build with the old syntax export default defineNuxtConfig({
i18n: {
strategy: 'prefix_except_default',
locales: [
{ code: 'de', iso: 'de-DE', file: 'de.yaml', dir: 'ltr' },
{ code: 'en', iso: 'en-US', file: 'en.yaml', dir: 'ltr' },
],
defaultLocale: 'de',
langDir: 'locales/',
vueI18n: {
fallbackLocale: 'de',
legacy: false,
locale: 'de',
},
},
}); the console will output:
However, Lines 53 to 88 in a0ead8d
A clarification of the correct usage in the documentation would be useful. |
Sorry, This error message is wrong. |
How can we resolve it? |
The you can see the docs:
|
Still there seems to be a problem with |
We have the same problem. It seems to be new in beta11 since beta10 doesn't have that problem (However it has another problem). |
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. |
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). |
I had this exact issue when trying to deploy the result of the "npm run generate" command. Everything worked great on development, but after deploying the application to my production server, only an error 500 page with the message "format is not defined" would show up. In a previous comment on this thread I saw someone talking about a missing file log on the console, and when I decided to look it up on my deploy, I've noticed that the file it was missing was in a path that wasn't supposed to exist, so it is missing from the generated files. It turns out that the i18n.options.js file was pointing to an invalid i18n.config.js file. In my case it was like this:
Manually modifying the file to look like this solved the issue for me: After I've fixed the link to the i18n.config file, everything started working as expected. |
@kazupon any update on the fix? or ETA? thanks! |
I've fixed this issue. |
I'm getting a different error now when I try to build the project with
|
The workaround of downgrading to v8.0.0-beta.10 does not work for me. It ends up in all nuxt-link not working. Need to downgrade. to v8.0.0-beta.9 |
@kazupon I updated to edge channel 8.0.0-beta.11-28059008.d1499b6 version. |
Could you give us your errors? 🙏 |
With latest beta12, I get another error than before too.
And only if I have the following in my nuxt.config.ts: |
I'm getting the same error as @jekuer using nuxt generate. |
Please reproduction repo or stackbliz 🙏 |
See here: https://stackblitz.com/edit/github-cr1uk5-mr8fcr?file=package.json |
like the similar issue #2077 |
I am also facing this issue with the latest beta version (12)
|
When using I updated the reproduction repo: https://stackblitz.com/edit/github-6ylvpz-ezzvf7 Everything works fine in development mode but when you run
You will get the same result while building when you run
|
Getting similar errors unfortunately, on beta 12 when deployed to Vercel
When the page is pre-rendered it doesn't seem to happen - but it does error when it's not and the page is rendered through nuxt SSR. |
Environment
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 messageformat is not defined
. When you check the network tab in the developer tools you will see that thei18n-config-[hash].js
file will not exist status 404 is returned.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: