I’m using a Next.js app with the app directory structure. I have a dynamic projects page
projects/[slug]/page.tsx.
When I run the project on localhost, it works perfectly. However, when I upload it to Vercel and click a dynamic route, it always results in an error (not found).
I tried to create a static page under the projects folder:
projects/test/page.tsx
This works perfectly.
However, when I visit this link on Vercel mydomain/projects/[slug] it shows me the content, but it no longer works on localhost.
Giorgi Mskhiladze is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.