You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 28, 2025. It is now read-only.
Regeneration of ISR pages using next-i18next fails.
Actual behavior
Regeneration fails because lambda keeps crashing, this is the error message I get :
{
"errorType": "Error",
"errorMessage": "next-i18next was unable to find a user config",
"stack": [
"Error: next-i18next was unable to find a user config",
" at _callee$ (/var/task/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:193:19)",
" at tryCatch (/var/task/node_modules/regenerator-runtime/runtime.js:63:40)",
" at Generator.invoke [as _invoke] (/var/task/node_modules/regenerator-runtime/runtime.js:293:22)",
" at Generator.next (/var/task/node_modules/regenerator-runtime/runtime.js:118:21)",
" at asyncGeneratorStep (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)",
" at _next (/var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)",
" at /var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7",
" at new Promise (<anonymous>)",
" at /var/task/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12",
" at serverSideTranslations (/var/task/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:247:17)"
]
}
Expected behavior
Page built with no issue in SSR, so it should too in ISR.
Steps to reproduce
Any ISR page with next-i18next should reproduce the issue.
What worked for me
Use the postBuildCommands to run a script after build and before deploy that adds next-i18next.config.js and the public/locales folder to the .serverless_nextjs/regeneration-lambda folder.
It seems that this has already been done for the default lambda, see this, but not for the regeneration lambda.
That's why the same page works in SSR but not in ISR.
The text was updated successfully, but these errors were encountered:
GuillaumeSD
changed the title
ISR not working with next-i18next
ISR fails with next-i18next
Sep 4, 2021
Issue Summary
Regeneration of ISR pages using next-i18next fails.
Actual behavior
Regeneration fails because lambda keeps crashing, this is the error message I get :
Expected behavior
Page built with no issue in SSR, so it should too in ISR.
Steps to reproduce
Any ISR page with next-i18next should reproduce the issue.
What worked for me
Use the postBuildCommands to run a script after build and before deploy that adds next-i18next.config.js and the public/locales folder to the .serverless_nextjs/regeneration-lambda folder.
It seems that this has already been done for the default lambda, see this, but not for the regeneration lambda.
That's why the same page works in SSR but not in ISR.
The text was updated successfully, but these errors were encountered: