Next.js 14 with SSG and Dynamic routing issue

I have a simple project want to output SSG file , but when i build my project , i findout that all my dynamic file are return 404 , just like i have a file /app/[id]/page.tsx , my page is base on the “id” to do some setting , i have no idea what “id” user will input .

It is easy to reproduce

  1. create a new next.js project
  2. set output: “export”, in next config file
  3. create /app/[id]/page.tsx
  4. npm run build and npx serve out
  5. after serve , just input http://domain/anyIdHere
  6. output 404

Next.js 14

Hey @leongan1994. Can you share the URL or a minimal reproducible example where I can see the problem? That will let me see what you see so I can help you solve it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.