next.js: Translations not showing on Next Link click using 'en' locale (i18next loses instance) only on Vercel

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
Binaries:
      Node: 18.8.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
Relevant packages:
      next: 13.4.1
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

Internationalization (i18n), Middleware / Edge (API routes, runtime)

Link to the code that reproduces this issue

https://github.com/miguel-sg-dev/next-app

To Reproduce

Go to https://next-app-delta-azure.vercel.app/en and click on the FAQ link. The new page does not load the translations

Describe the Bug

When I’m on the en locale (https://next-app-delta-azure.vercel.app/en) and click on the FAQ link, it should load the faq page with the translated title but instead it shows the key “faq.title”.

The only message I get in the console after I click on the link is this warning: image

Couldn’t try on canary version because it conflicts with the next-i18next dependency.

This issue just happens on Vercel. When I run the build and start the production server locally it works fine.

Expected Behavior

When clicking on the Link, the page should load with the translations, as it does when you click from https://next-app-delta-azure.vercel.app/ or https://next-app-delta-azure.vercel.app/es

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Vercel

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 7
  • Comments: 17 (10 by maintainers)

Most upvoted comments

TY @JesseKoldewijn I try to get a minimal reproduction up and running, to make sure this is actually the same issue

it seems to lose the i18n client when going through a soft route. Maybe a good idea to specify this or something simular in the issue title? 👍