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.

Why nuxt-i18n edge not work in SSR

See original GitHub issue

Environment

“nuxt”: “npm:nuxt3@latest” “@nuxtjs/i18n”: “npm:@nuxtjs/i18n-edge”,

Reproduction

https://github.com/max5432112345/nuxt-error-1 (I also added Pinia, axios-alt, and auth-alt)

1 chage in nuxt config to SSR target: ‘static’,

// ssr: false,

2 npm run dev

Describe the bug

text what is need to be translate disappeared

Additional context

// @nuxtjs/i18n configuration
{

i18n: {
    defaultLocale: 'en',
    detectBrowserLanguage: {
      useCookie: true,
      cookieKey: 'i18n_redirected'
      // onlyOnRoot: true
    },
    langDir: 'locales/',
    lazy: true,
    locales: [
      {
        code: 'en',
        file: 'en.json',
        iso: 'en-US',
        name: 'US'
      },
      {
        code: 'gb',
        file: 'gb.json',
        iso: 'en-GB',
        name: 'GB'
      }
    ],
    noPrefixDefaultLocale: false,
    parsePages: false,
    seo: false,
    strategy: 'prefix',
    vueI18n: {
      fallbackLocale: 'en',
      // silentFallbackWarn: true
    },
    vueI18nLoader: true
  },

  target: 'static',

  // ssr: false,
}

Logs

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
max5432112345commented, Aug 9, 2022

@danielroe I think it not work, i make a new repo

0reactions
max5432112345commented, Aug 9, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

nuxt/i18n for Nuxt3 · Discussion #1287 - GitHub
I would like to do an edge release for nuxt/i18n as well, like nuxt. ... Is this really working? i18n doesn't work with...
Read more >
nuxt-i18n routing is not working with SSR but working on SPA
I was working on nuxt universal(ssr) app and i wanted to add a translation using nuxt-i18n , i followed the config instruction on...
Read more >
Introduction - i18n-module - Nuxt
This documentation is for the Nuxt 2 version of the module. For version compatible with Nuxt 3 see https://v8.i18n.nuxtjs.org/. Module i18n for NuxtJS....
Read more >
Netlify Edge Functions: Serverless Compute Powered by Deno
Edge Functions enables you to run serverless JavaScript/TypeScript functions right from Netlify's Edge network. It's a full runtime environment, ...
Read more >
vite-plugin-ssr
Like Next.js/Nuxt but as do-one-thing-do-it-well Vite plugin.
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