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.

Bug with next-i18next and deployment on Vercel

See original GitHub issue

Verify canary release

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

Provide environment information

"next": "12.2.5", // Also tested on 12.2.6-canary.7 and 12.1.6
"next-i18next": "12.0.0", // Also tested on 10.5.0
"react": "18.2.0", // Also tested on 17.0.2
"react-dom": "18.2.0" // Also tested on 17.0.2

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Vercel

Describe the Bug

Context

We encountered a bug around next-i18next that resulted in serverless crashes for catch-all routes. We noticed this bug for the first time Monday around 14:00 CET and think it is potentially related with a change in the serverless runtime/filestructure as older deployments that used to work stoped working when redeploying.

Some other people also seemed to have encountered the same bug. See also here:

What we tried

So we upgraded our versions of next and next-i18next (like some of the other people did). With the most recent next.js and next-i18next versions translations seem to work only in very specific cases.

We created a minimal replicable deployment (Repo) where we prebuild two pages via putting them in getStaticPaths:

Both pages do not use translations when opening them directly.

However, when first navigating to the index.js and then clicking on of the links the two pages use proper translation.

Note: The translations will break upon refresh.

Setup Description

  • catch all route in pages folder
  • page set to static site generation
  • default locale is set
  • incremental static regeneration is on

Expected Behavior

working Translations

Link to reproduction

https://github.com/everdropde/ed-i18n-bug

To Reproduce

  1. Clone the Repo and deploy it to Vercel
  2. Click any link on page

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:14
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
ellisiocommented, Aug 31, 2022

@swarnava Unrelated to fixing this, should there perhaps be a notice put on https://www.vercel-status.com/? I know that when we first were impacted by this that was the first stop for us to see if there was a Vercel issue.

I ask this because if anyone tries to redeploy an old version, that version breaks as well so it is impossible to rollback. If this is a production website/app, that ends up being an outage for that customer.

8reactions
swarnavacommented, Aug 31, 2022

I am working with the team to prepare a fix for this. Appreciate your patience everyone!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug with next-i18next and deployment on vercel (recently)
We encountered a bug around next-i18next that resulted in serverless crashes for catch-all routes. We noticed this bug for the first time Monday ......
Read more >
Next.js on Vercel – Vercel Docs
When deploying to Vercel, images are automatically optimized on demand, keeping your build times fast increasing your page load performance and Core Web...
Read more >
No Next.js version could be detected in your project. Make sure
Nov 3, 2022 ... Make sure `"next"` is installed in "dependencies" or "devDependencies" ... on vercel deployments although I have a next in...
Read more >
Next.js With I18n Rosetta Example - StackBlitz
(https://stackblitz.com/github/vercel/next.js/. tree/canary/examples/with-i18n-rosetta). ## Deploy your own. Deploy the example using [Vercel](https://.
Read more >
Vercel Releases Next.js 13 - DEVOPSdigest
Rockset announced a native connector for Amazon Managed Streaming for Apache Kafka (MSK) service, allowing AWS customers to deploy the modern ...
Read more >

github_iconTop Related Medium Post

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