-
Notifications
You must be signed in to change notification settings - Fork 66
Missing locale files with next-i18next #169
Comments
hey @2j2e! thanks for bringing this to us! my first thought: why are you using
in your in next 10+, this configuration alone will take care out of i18n out of the box for you, with no need for an additional package like next-i18next. i believe packages like that one existed before next 10 was released with native i18n support. |
note: if you're using i18n in next 10.0.6, you need to be on next-on-netlify 2.8.7 per a breaking change in 10.0.6. see this release: https://github.com/netlify/next-on-netlify/releases/tag/v2.8.7 |
I tried with and without explicit
According to my lock file, the plugin uses v2.8.7 under the hood.
Looking on the pipeline
I made a quick test with Vercel deployment and everything works fine, this means #1 is not an option for this case. |
@2j2e gotcha gotcha ok i'm with you!! thanks for explaining. let's see then what might be up. are you able to open a simple repo with next-i18next and the configs you've already shared that reproduces your issue? one thing i will say is that we don't currently support next-configured redirects and rewrites (see https://github.com/netlify/next-on-netlify/issues/24), but i think your existing issue is just related to your translations not being bundled with the lambda for whatever page you're trying to view (assuming the error you shared is at runtime). |
i believe this is related to https://github.com/netlify/next-on-netlify/issues/124 |
Not sure about #124, |
Wooh, I found that next v10 is not actually supported by |
@2j2e haaa oh no.. what does that mean exactly for you/for this issue? i will say that i still believe this is at least in part related to #124 because it seems and again all that said, is this specific issue something you want to keep open for when next 10 is supported by next-i18next? would you be comfortable tracking the other issues (#124, #24) that would be blockers for this type of integration? let me know what you're thinking! |
Thank you for a quick tracking and answers. I decided to switch to the |
@2j2e of course!!! and oh that's great news yay! i'll close this one and if you run into any issues with |
I'm running into an issue with next-i18next. Read all related issues, read the PR which should cover i18n issues, but still in a circle of fail.
{"errorType":"Error","errorMessage":"ENOENT: no such file or directory, scandir '/var/task/public/static/locales/en'","trace":["Error: ENOENT: no such file or directory, scandir '/var/task/public/static/locales/en'"," at Object.readdirSync (fs.js:955:3)"," at getAllNamespaces (/var/task/src/netlify/functions/next_admin/nextPage.js:89104:21)"," at createConfig (/var/task/src/netlify/functions/next_admin/nextPage.js:89109:29)"," at new NextI18Next (/var/task/src/netlify/functions/next_admin/nextPage.js:119486:48)"," at Object.k7Sn (/var/task/src/netlify/functions/next_admin/nextPage.js:89904:18)"," at __webpack_require__ (/var/task/src/netlify/functions/next_admin/nextPage.js:31:31)"," at Module.cha2 (/var/task/src/netlify/functions/next_admin/nextPage.js:69840:63)"," at __webpack_require__ (/var/task/src/netlify/functions/next_admin/nextPage.js:31:31)"," at Module.kt/p (/var/task/src/netlify/functions/next_admin/nextPage.js:91877:22)"," at __webpack_require__ (/var/task/src/netlify/functions/next_admin/nextPage.js:31:31)"]}
To Reproduce
The whole configuration done according to docs.
i18n.js (next-i18next)
next.config.js
Versions
The text was updated successfully, but these errors were encountered: