Let me know if I'm somehow incorrect, but I'm observing the following erratic behavior:
At dev-time, the index root of the website does not exist (localhost:3000 gives me a 404), meaning no auto-redirect.
At build-time, I observe (with an extra console.log) the following export path error in next build:
info Collecting page data
["/en","/jp","//index","/404","/500"]
Build error occurred
TypeError: Cannot read properties of undefined (reading '_isAppDir')
at O:_web\idol-showdown-app\node_modules\next\dist\export\index.js:412:39
at Array.filter ()
at O:_web\idol-showdown-app\node_modules\next\dist\export\index.js:411:43
at async Span.traceAsyncFn (O:_web\idol-showdown-app\node_modules\next\dist\trace\trace.js:103:20)
at async O:_web\idol-showdown-app\node_modules\next\dist\build\index.js:1483:21
at async Span.traceAsyncFn (O:_web\idol-showdown-app\node_modules\next\dist\trace\trace.js:103:20)
at async O:_web\idol-showdown-app\node_modules\next\dist\build\index.js:1339:17
at async Span.traceAsyncFn (O:_web\idol-showdown-app\node_modules\next\dist\trace\trace.js:103:20)
at async build (O:_web\idol-showdown-app\node_modules\next\dist\build\index.js:143:29)
error Command failed with exit code 1.
Note the erroneous //index it supposedly sees, instead of just / or similar. The /en and /jp routes work as expected.
I replicate the example project precisely, with the following structure:
- pages
- [locale]
- index.tsx
- _app.tsx
- [[...paths]].tsx
- public
- locales
- en
- common.json
- ...
and with [[...paths]].tsx and _app.tsx both matching the README. Is this potentially being caused by the current useRootPathRedirect implementation?
I update the deps in the demo to the latest version, but i could not reproduce your bug.
could you plz try the demo, or provide more info, which would be very greatful.
https://github.com/Yrobot/i18next-ssg/blame/b009d49145f214e1898e4fd7e5312447beccbdce/src/router.ts#L10
I'm using
so the freshest available for both.
Let me know if I'm somehow incorrect, but I'm observing the following erratic behavior:
localhost:3000
gives me a 404), meaning no auto-redirect.console.log
) the following export path error innext build
:Note the erroneous
//index
it supposedly sees, instead of just/
or similar. The/en
and/jp
routes work as expected.I replicate the example project precisely, with the following structure:
and with
[[...paths]].tsx
and_app.tsx
both matching the README. Is this potentially being caused by the currentuseRootPathRedirect
implementation?