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
When integrating i18next into a nextJS app, everything works as expected, unless that everytime a page is loaded (by opening localhost:3000), I get an error message in my server logs. The translation and everything on the frontend still works and all translation JSON files are successfully loaded.
This is the logged error:
i18next::backendConnector: loading namespace translation for language en failed TypeError: Failed to parse URL from /locales/en/translation.json
at new _Request (node:internal/deps/undici/undici:5057:19)
at R (/home/dcts/code/dexteronradix/website/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:340580)
at doOriginalFetch (webpack-internal:///(rsc)/./node_modules/next/dist/server/lib/patch-fetch.js:380:24)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/lib/patch-fetch.js:508:20) {
[cause]: TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:405:5)
at new URL (node:internal/url:637:13)
at new _Request (node:internal/deps/undici/undici:5055:25)
at R (/home/dcts/code/dexteronradix/website/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:35:340580)
at doOriginalFetch (webpack-internal:///(rsc)/./node_modules/next/dist/server/lib/patch-fetch.js:380:24)
at eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/lib/patch-fetch.js:508:20) {
input: '/locales/en/translation.json',
code: 'ERR_INVALID_URL'
}
}
When I check the path localhost:3000/locales/en/translation.json I can access the json file from my browser.
To Reproduce
If there is no obvious explenation to why this is happening I will happily provide a minimal reproducable example.
Expected behavior
No error log in the server logs.
Your Environment
runtime version: node v18.18.2
i18next version: "react-i18next": "^14.1.0"
os: Linux (Ubuntu 22.04 LTS)
The text was updated successfully, but these errors were encountered:
馃悰 [Bug Report] Failed to parse URL error log
When integrating i18next into a nextJS app, everything works as expected, unless that everytime a page is loaded (by opening localhost:3000), I get an error message in my server logs. The translation and everything on the frontend still works and all translation JSON files are successfully loaded.
This is the logged error:
When I check the path localhost:3000/locales/en/translation.json I can access the json file from my browser.
To Reproduce
If there is no obvious explenation to why this is happening I will happily provide a minimal reproducable example.
Expected behavior
No error log in the server logs.
Your Environment
node v18.18.2
"react-i18next": "^14.1.0"
The text was updated successfully, but these errors were encountered: