-
-
Notifications
You must be signed in to change notification settings - Fork 517
Open
Labels
Description
Environment
- Nuxt: 4.2.2
- Nitro: 2.12.9
- @nuxtjs/i18n: 10.2.1
- Deployment: Netlify (SWR/ISR)
- Node: 22.20.0
Reproduction
- Create a Nuxt 4 project with @nuxtjs/i18n
- Configure route rules with ISR/SWR
- Deploy to Netlify
- Navigate to any page - the _payload.json request fails with 500 error
- Refresh the page - it works (cache is now warm)
Describe the bug
When using the @nuxtj/i18n module with latest Nuxt version on Netlify (both locally and in production), _payload.json requests fail during ISR/SWR requests with cold cache:
H3Error: Nuxt I18n server context has not been set up yet.
at useI18nContext (file:///.netlify/functions-serve/.unzipped/server/chunks/nitro/nitro.mjs:7280:11)
at file:///.netlify/functions-serve/.unzipped/server/chunks/nitro/nitro.mjs:7630:17
This is a critical issue for production deployments using ISR/SWR with i18n, as it causes 500 errors on first page loads.
Additional context
- Netlify local: Consistently on _payload.json requests
- Netlify production: Only on first request with cold cache when using ISR/SWR routes
- Nuxt dev: Does NOT occur
- After refresh: Works fine (cache is warm)
Reactions are currently unavailable