Next.js Discord

Discord Forum

Problem with [slug] and next-intl

Answered
Satin Angora posted this in #help-forum
Open in Discord
Satin AngoraOP
I have a small but serious problem. My NextJS website is available in different languages via Next-intl. This also works great with the created pages!

However, the whole thing does NOT run via slugs. Neither my article pages nor the gallery page are displayed at all. It ALWAYS says 404 Page-Not-Found. WITHOUT plugin everything works great.

Config of Next-intl is standard and has not been changed. Does anyone here have a current guide on how I can solve this?
Answered by Satin Angora
okay .. my problem was ... [slug].tsx ... not [slug]/page.tsx ..
View full answer

7 Replies

Satin AngoraOP
So my complete website is currently in App/local/ do I understand correctly that I should save Gallery as an example in /app/(nolocal) ?
Satin AngoraOP
Satin AngoraOP
So the [slug].tsx is now running apart from next-intl. However, I still get the 404 error. The strange thing is, neither in the browser nor in VSCode I get an error ... I am at a loss
American Crow
Guess you'll have to provide a mininmal repo. You probably have some configuration error but it's hard to pinpoint since your project already got a lot of routes. From your screenshot the folder structure looks correct. Comparing it to one of my projects:
Satin AngoraOP
okay .. my problem was ... [slug].tsx ... not [slug]/page.tsx ..
Answer
Satin AngoraOP
I must have been mentally on another planet