New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with next-i18next and deployment on Vercel #40130
Comments
We ran into this as well, as we were on next-18next.config.js: const path = require('path');
module.exports = {
debug: process.env.NODE_ENV === 'development',
i18n: {
defaultLocale: 'en',
locales: ['en', 'es'],
},
localePath: path.resolve('./public/locales'),
reloadOnPrerender: process.env.NODE_ENV === 'development',
}; pages/_document.js: import i18nextConfig from '../next-i18next.config';
export default class MyDocument extends Document {
render() {
const currentLocale =
// eslint-disable-next-line no-underscore-dangle
this.props.__NEXT_DATA__.locale || i18nextConfig.i18n.defaultLocale;
return (
<Html lang={currentLocale}>
<!-- our document code -->
</Html>
);
}
} We are on |
Hi, Can you set following env variable and let us know if you can reproduce?
|
@swarnava yes, we still can reproduce. My hunch is that it's related to vercel/nft#304 |
For my org, dropping the vercel cli version to
Will continue to monitor for any new CLI version releases though. For reference we are on Thank you @swarnava for the call out of dropping the CLI version! |
I am working with the team to prepare a fix for this. Appreciate your patience everyone! |
Hi, could you confirm if you have |
@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. |
@swarnava yes, if you have |
In that case, we will likely going to stay with the current approach. Ideally, you should NOT be using |
@swarnava We disabled it previously because #30561 (comment) |
Couldn't agree more, I don't think its good practice to simply roll out potentially breaking changes without informing your customers about it. There was no indication on the status page, that a new Vercel CLI had been rolled out to production (would have helped us speed up the bug hunting process massively). |
Bump `@vercel/nft` to version [0.22.1](https://github.com/vercel/nft/releases/tag/0.22.1) - Fixes #40130
btw, if you are using |
Bump `@vercel/nft` to version [0.22.1](https://github.com/vercel/nft/releases/tag/0.22.1) - Fixes vercel#40130
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
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
Expected Behavior
working Translations
Link to reproduction
https://github.com/everdropde/ed-i18n-bug
To Reproduce
The text was updated successfully, but these errors were encountered: