-
-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Labels
Status: Review NeededRequest for review commentsRequest for review comments
Description
Reporting a bug?
Integrating vue-i18n into a Nuxt 3.7 application according to the instructions results in the following error when building and running the application:
[nuxt] [request error] [unhandled] [500] Cannot find module '/home/projects/github-hnz7et-dysose/.output/server/chunks/dist/vue-i18n.runtime.mjs' imported from /home/projects/github-hnz7et-dysose/.output/server/chunks/app/server.mjs
It works fine in dev.
Expected behavior
No error.
Reproduction
https://stackblitz.com/edit/github-hnz7et-dysose?file=nuxt.config.ts
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 16.20.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.4.2 - /usr/local/bin/npm
pnpm: 8.6.10 - /usr/local/bin/pnpm
npmPackages:
@intlify/unplugin-vue-i18n: ^1.2.0 => 1.2.0
vue-i18n: ^9.4.0 => 9.4.0 Screenshot
No response
Additional context
It might be just a documentation error according Daniel Roe from Nuxt: nuxt/nuxt#23180 (comment)
This workaround seems to work without issues.
// https://nuxt.com/docs/api/configuration/nuxt-config
import VueI18nPlugin from '@intlify/unplugin-vue-i18n';
export default defineNuxtConfig({
devtools: { enabled: true },
+ build: {
+ transpile: [/vue-i18n/]
+ },
vite: {
plugins: [
VueI18nPlugin.vite({
/* options */
}),
],
},
});Validations
- Read the Contributing Guidelines
- Read the Documentation
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussions
Metadata
Metadata
Assignees
Labels
Status: Review NeededRequest for review commentsRequest for review comments