intlify / intlify/nuxt3

After adding `"@intlify/nuxt3"` to `buildModules` in `nuxt.config.ts` there's a Nuxt error

Open
#63 25 comments 29 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
204
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I installed `"@intlify/nuxt3"` and added it to my `buildModules`.

After adding `"@intlify/nuxt3"` to `buildModules` in `nuxt.config.ts` there's a Nuxt error:
```
__vite_ssr_import_2__.default is not a function
```

The error occurs even after reinstallation of package and after removing `.nuxt` directory.

Stacktrace:
```
at ./.nuxt/dist/server/server.mjs:3590:60
at fn (./.nuxt/dist/server/server.mjs:396:27)
at Object.callAsync (./node_modules/unctx/dist/index.mjs:41:19)
at callWithNuxt (./.nuxt/dist/server/server.mjs:398:23)
at applyPlugin (./.nuxt/dist/server/server.mjs:353:29)
at Module.applyPlugins (./.nuxt/dist/server/server.mjs:363:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async createNuxtAppServer (./.nuxt/dist/server/server.mjs:46:7)
at async renderToString (./node_modules/vue-bundle-renderer/dist/index.mjs:252:19)
at async ./.nuxt/dev/index.mjs:486:20
```

The line that shows an error is this one:
```
const loadedOptions = await __vite_ssr_import_2__.default();
```

This line is in a code block:
```
const { vueApp: app } = nuxt;
const loadedOptions = await __vite_ssr_import_2__.default();
if (!isEmpty(__vite_ssr_import_3__.default)) {
loadedOptions.messages = __vite_ssr_import_3__.default;
}
const i18n = __vite_ssr_import_0__.createI18n({
legacy: false,
globalInjection: true,
locale: "en",
...loadedOptions
});
app.use(i18n);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.