I have a nextjs (15.3.1) application entirely based on dynamic routes, this is the output when I build it:
Route (app) Size First Load JS
┌ ○ / 412 B 105 kB
├ ○ /_not-found 988 B 105 kB
├ ƒ /[projectId] 16.7 kB 845 kB
├ ƒ /[projectId]/[userId] 6.10 kB 913 kB
├ ƒ /[projectId]/members 150 B 104 kB
├ ƒ /[projectId]/members/all 692 B 829 kB
├ ƒ /[projectId]/profile/[userId] 11.5 kB 910 kB
├ ƒ /[projectId]/task/[taskId] 19.6 kB 1.04 MB
├ ƒ /[projectId]/task/all 3.95 kB 152 kB
├ ƒ /[projectId]/task/create 384 kB 1.30 MB
├ ƒ /[projectId]/settings 10.6 kB 798 kB
Now, the first thing the app does is to get all the possible projectId and then you navigate to the one you want by adding it to the url manually (I know it's weird but this will integrate with another app later on).
On localhost everywhing works, I have my project ids, and I navigate manually to localhost:3000/113 and it's all good. When deployed with vercel all the same routes return 404s. My next config file just have come images remote pattern...
What could be the problem? I'm not even sure how to debug this