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
i18n issues when running "node .output/server/index.mjs", while "nuxt dev" and "nuxt preview" works fine #1833
Comments
Thank you for your feedback!
vue-i18n ( Unfortunately, in the case of back-end, such as Nuxt's API, vue-i18n cannot pre-compile it. 😞 |
Thank for your information, Is there a solution that can be fixed it on the front end(nuxt3)? |
I’m working on i18n resource pre-compilation that is possible using the current nuxt (nirto) prerender mechanism. |
Looking forward to this feature |
Any updates on this @kazupon ? :) |
Environment
Reproduction
in app.vue:
const runtimeConfig = useRuntimeConfig();
const nuxtApp = useNuxtApp();
const { data } = await useFetch(${runtimeConfig.apiBaseUrl}/api/translations);
const translationsData = data.value;
nuxtApp.$i18n.warnHtmlMessage = false;
for (const i in translationsData) {
const translations = translationsData[i];
nuxtApp.$i18n.setLocaleMessage(i, translations);
}
Describe the bug
While running "nuxt dev" or "nuxt preview" everything works fine without any issues, but when running "node .output/server/index.mjs", then i get this error in console "[intlify] The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format.". And half of my translations show keys instead of translation in UI.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: