question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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);

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:29
  • Comments:25 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
LuckyWraptorcommented, May 18, 2022

Merged for v0.2.2

1reaction
LuckyWraptorcommented, May 17, 2022

I’ve created a PR #65 as per @exreplay’s findings: https://github.com/intlify/nuxt3/issues/64#issuecomment-1127416063

The patch has been found to work with RC.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt configuration file
The runtime config is added to the Nuxt payload so there is no need to rebuild in order to update the runtime configuration...
Read more >
Integration for Nuxt.js - Windi CSS
note: buildModules is no longer needed in Nuxt 3 and Nuxt Bridge; all modules should be added to modules instead. nuxt.config.js.
Read more >
Using Modules and Pinia to structure Nuxt 3 app
Just a quick thing: I think buildModules in nuxt config is going to be discouraged in nuxt3 since every module is now a...
Read more >
Nuxt + TypeScript + Apollo: a bumpy road - Codegram
Learn how to properly configure your Nuxt application to work with ... the default error overlay that appears when there is a lint...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found