\n\n\u003Cimg width=\"1436\" height=\"474\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/378d9d5d-c5ae-48e5-a3b5-da94d168e206\" />\n\n### Describe the bug\n\n修改多语言热更新报错,\n\n\u003Cimg width=\"3318\" height=\"334\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ba25f21a-3216-4066-9e49-269efad06425\" />\n\n\u003Cimg width=\"1436\" height=\"474\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/378d9d5d-c5ae-48e5-a3b5-da94d168e206\" />\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3226,3229],{"name":3227,"color":3228},"upstream","fbca04",{"name":3176,"color":3177},3753,"closed","在 nuxt4.0.2 里使用 \"@nuxtjs/i18n\": \"^10.0.2\" 热更新报错","2025-07-24T09:13:52Z","https://github.com/nuxt-modules/i18n/issues/3753",0.6275492,{"description":3237,"labels":3238,"number":3241,"owner":3179,"repository":3180,"state":3231,"title":3242,"updated_at":3243,"url":3244,"score":3245},"### Environment\n\n```\n- Operating System: Darwin\n- Node Version: v22.14.0\n- Nuxt Version: 3.16.2\n- CLI Version: 3.25.0\n- Nitro Version: 2.11.9\n- Package Manager: npm@10.9.2\n- Builder: -\n- User Config: ssr, compatibilityDate, devtools, modules, i18n\n- Runtime Modules: @nuxt/content@3.4.0, @nuxtjs/i18n@9.5.3\n- Build Modules: -\n```\n\n### Reproduction\n\nReproduction: https://stackblitz.com/~/github.com/ismaoc/test2\nCode: https://github.com/ismaoc/test2\n\n### Describe the bug\n\nJust created a fresh Nuxt project with `npm create nuxt \u003Cproject_name>` and added nuxti18n with `npx nuxi@latest module add i18n`. Added a basic locale config (same as the docs) and get a \"not found error\" or \"Failed to parse JSON file.\" for the locales files.\n\nThe config\n\n```\ni18n: {\n lazy: false,\n locales: [\n { code: 'en', file: 'en' },\n { code: 'fr', file: 'fr' },\n ],\n }\n```\n\nthrows the error:\n\n\n```\n[9:12:36 PM] ERROR Pre-transform error: Failed to load url /i18n/locales/en (resolved id: /Users/user/pruebas/test2/i18n/locales/en) in /Users/user/pruebas/test2/.nuxt/i18n.options.mjs. Does the file exist?\n\n\n[9:12:36 PM] ERROR Pre-transform error: Failed to load url /i18n/locales/fr (resolved id: /Users/user/pruebas/test2/i18n/locales/fr) in /Users/user/pruebas/test2/.nuxt/i18n.options.mjs. Does the file exist?\n```\n\nIf I add the .json extension like this:\n\ni18n: {\n defaultLocale: 'en',\n locales: [\n { code: 'en', name: 'English', file: 'en.json' },\n { code: 'fr', name: 'Français', file: 'fr.json' }\n ]\n }\n\nthrows:\n\n```\n ERROR Pre-transform error: Failed to parse JSON file. 9:19:58 PM\n Plugin: vite:json\n File: /Users/user/pruebas/test2/i18n/locales/fr.json\n\n\n ERROR Pre-transform error: Failed to parse JSON file. 9:19:58 PM\n Plugin: vite:json\n File: /Users/user/pruebas/test2/i18n/locales/en.json\n```\n\nThanks.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3239],{"name":3240,"color":3228},"upstream issue",3560,"Bug: i18n Configuration Not Loading Locale Files","2025-05-16T11:33:25Z","https://github.com/nuxt-modules/i18n/issues/3560",0.64841783,{"description":3247,"labels":3248,"number":3250,"owner":3179,"repository":3180,"state":3231,"title":3251,"updated_at":3252,"url":3253,"score":3254},"### Environment\n\n- Operating System: Linux\n- Node Version: v22.14.0\n- Nuxt Version: 3.18.0\n- CLI Version: 3.28.0\n- Nitro Version: 2.12.5\n- Package Manager: npm@10.9.2\n- Builder: -\n- User Config: compatibilityDate, devtools, modules, i18n, vite\n- Runtime Modules: @nuxt/eslint@1.0.1, @nuxtjs/i18n@10.0.6, @nuxt/image@1.9.0\n- Build Modules: -\n------------------------------\n\n\n### Reproduction\n\n**i18n config**\n```\nconst UA_LOCALE = 'ua';\nconst EN_LOCALE = 'en';\n\nexport const LOCALES = [\n {\n code: EN_LOCALE,\n iso: 'en',\n file: 'en.js',\n hreflang: EN_LOCALE,\n title: 'English',\n },\n {\n code: UA_LOCALE,\n iso: 'uk',\n file: 'ua.js',\n hreflang: 'uk',\n title: 'Українська',\n },\n];\n\nexport default {\n locales: LOCALES,\n defaultLocale: EN_LOCALE,\n strategy: 'prefix_except_default',\n fallbackLocale: EN_LOCALE,\n detectBrowserLanguage: true,\n langDir: './locales',\n restructureDir: '',\n};\n\n```\n\nnuxt.config.js\n```\nimport { defineNuxtConfig } from \"nuxt/config\"\nimport i18nConfig from './config/i18n.config';\n\nexport default defineNuxtConfig({\n compatibilityDate: '2024-11-01',\n devtools: { enabled: true },\n modules: ['@nuxt/eslint', '@nuxtjs/i18n', '@nuxt/image'],\n i18n: i18nConfig,\n vite: {\n css: {\n preprocessorOptions: {\n scss: {\n additionalData: '@use \"~/assets/scss/_variables.scss\" as *;'\n }\n }\n }\n },\n})\n\n```\n**Project is SSR not SSG**\n\n### Describe the bug\n\nOn direct app access i18n request twice for message.json.\n\n\u003Cimg width=\"918\" height=\"241\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/e1267897-7583-47ee-8d94-3286f5f875cc\" />\n\n It calls twice `loadMessages` first time from init, and second after \"locale-changing\" middleware.\n\n\u003Cimg width=\"1591\" height=\"419\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/956c305d-57e9-4a71-a3b6-5e2231a460df\" />\n\nLog from middleware handler\n\n\u003Cimg width=\"1080\" height=\"934\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/228c3154-f653-4190-b9a4-7ce6c197b00d\" />\n\nI faced this problem on big project, i thought maybe i have problems in router or something else, but used it tiny one to be sure\nTried to add and remove lazy: true, detectBrowserLanguage: false also tried.\n\n**Project structure, no custom routing**\n\u003Cimg width=\"1137\" height=\"991\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/9b9385cd-713e-4801-af61-6f8be38c73f1\" />\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3249],{"name":3173,"color":3174},3813,"Duplicate request on client for messages","2025-09-11T15:30:00Z","https://github.com/nuxt-modules/i18n/issues/3813",0.6500735,{"description":3256,"labels":3257,"number":3264,"owner":3179,"repository":3180,"state":3231,"title":3265,"updated_at":3266,"url":3267,"score":3268},"### Environment\n\n- Nuxt version: 3.17.4\n- @nuxtjs/i18n version: 10.0.0-beta-7\n- Deployment target: Static site (nuxi generate)\n- Works fine in SSR build (nuxi build)\n- Node version: 22\n\n### Reproduction\n\nhttps://codesandbox.io/p/devbox/prod-https-6gz2f5\n\n- run `pnpm generate` command and check output folder. there is no i18n folder. \n- run `pnpm start` to run generate build. open browser console. you'll see `Failed to load messages for locale en FetchError: [GET] \"/_i18n/en/messages.json\":`\n\n### Describe the bug\n\nWhen generating a static site using `nuxi generate`, I get the following error in the console when loading the site:\n```\nFailed to load messages for locale en FetchError: [GET] \"/_i18n/en/messages.json\": 404 Not Found\n```\n\nThe same Nuxt app works fine with nuxtjs/i18n v9\n\nSetting `ssr: true` works fine for both build & generate \n\n### Additional context\n\nHere’s part of my nuxt.config.ts:\n```\n{\n defaultLocale: 'en',\n debug: import.meta.env.DEV,\n locales: [\n {\n code: 'en',\n language: 'en-US',\n file: 'en.json',\n name: 'English',\n },\n {\n code: 'es',\n file: 'es.json',\n name: 'Spanish',\n },\n {\n code: 'tl',\n file: 'tl.json',\n name: 'Tagalog (Filipino)',\n },\n ],\n strategy: 'no_prefix',\n detectBrowserLanguage: {\n useCookie: true,\n cookieKey: 'dmc.locale',\n redirectOn: 'root',\n },\n}\n```\n\n### Logs\n\n```shell\nTkPgtAp_.js:9 Failed to load messages for locale en FetchError: [GET] \"/_i18n/en/messages.json\": 404 Not Found\n at async s (N_fP37pm.js:19:23784)\n at async Object.loadLocaleMessages (N_fP37pm.js:53:9792)\n at async B1 (N_fP37pm.js:53:11552)\n at async setup (N_fP37pm.js:67:48664)\n at async t$ (N_fP37pm.js:19:30748)\n at async i (N_fP37pm.js:19:31273)\n at async N_fP37pm.js:19:31213\n at async Promise.all (:8080/index 5)\n at async N_fP37pm.js:19:31122\n at async i (N_fP37pm.js:19:31273)\n at async n$ (N_fP37pm.js:19:31324)\n at async Qk (N_fP37pm.js:1100:1993)\n```",[3258,3261],{"name":3259,"color":3260},"scope: ssg","85eac7",{"name":3262,"color":3263},"scope: ssr","0052cc",3645,"Failed to load messages for locale only in static site generated with nuxi generate (404 on /_i18n/en/messages.json)","2025-05-26T18:06:23Z","https://github.com/nuxt-modules/i18n/issues/3645",0.6514936,{"description":3270,"labels":3271,"number":3278,"owner":3179,"repository":3180,"state":3231,"title":3279,"updated_at":3280,"url":3281,"score":3282},"### Environment\n\n------------------------------\n- Operating System: Darwin\n- Node Version: v20.18.0\n- Nuxt Version: 3.16.0\n- CLI Version: 3.22.5\n- Nitro Version: 2.11.6\n- Package Manager: pnpm@9.12.2\n- Builder: -\n- User Config: modules, devtools, app, css, runtimeConfig, future, compatibilityDate, vite, postcss, eslint, i18n, image, prismic\n- Runtime Modules: @nuxt/eslint@1.2.0, @nuxtjs/prismic@4.1.0, @nuxt/fonts@0.11.0, @nuxtjs/i18n@9.3.1, @nuxt/image@1.9.0, @vueuse/nuxt@13.0.0\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-w8n5eqto?file=pages%2Findex.vue\n\n### Describe the bug\n\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\n\n```",[3272,3275],{"name":3273,"color":3274},"🍰 p2-nice-to-have","0e8a16",{"name":3276,"color":3277},"scope: components","B327C3",3402,"Double nested `NuxtLinkLocale`","2025-05-30T19:25:27Z","https://github.com/nuxt-modules/i18n/issues/3402",0.65421903,["Reactive",3284],{},["Set"],["ShallowReactive",3287],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$frA9l74IF4eKTWzH9WKr401pOgKoiZYIsDcTTOOollWg":-1},"/nuxt-modules/i18n/3807"]