3

I'm using the last version of nextJS (13.3) and have a fairly simple routing as follows.

- app
-- blog
--- [post]

The following route works perfectly in the local environment: http://localhost:3000/blog/just-a-blog-post.
But deploying on Vercel gives me the following error: This page could not be found.
the build to Vercel was successful, the home page works fine.

Ayoub k
  • 7,788
  • 9
  • 34
  • 57
  • Does this answer your question? [NextJS deployed to Vercel: 404 page not found](https://stackoverflow.com/questions/65771294/nextjs-deployed-to-vercel-404-page-not-found) – eten Apr 17 '23 at 02:37
  • @eten, actually I tried the answers there but no help. the preset is already set to Next.js and since the next is installed in the root directory, Don't think I need to set any root directory in Vercel. Ah and by the way all routes work fine, only the dynamic ones ([post]) – Ayoub k Apr 17 '23 at 02:57
  • Did you manage to resolve this? I have an similar issue! – ninjaPixel Jun 01 '23 at 19:58
  • I'm using NextJS 13.4.4 and have just solved this problem in my project. My app already has files in the `/pages` directory (which are working fine). After creating my first `/app` route, the new (dynamic) route returns a 404 Page Not Found. I had to add a new – non-dynamic – page to the `/app` directory and I also had to remove the `i18n` section from my next.config.js file. – ninjaPixel Jun 01 '23 at 21:00

0 Answers0