Migration from /pages to /app router with Next.js > Get a 404 on homepage when deploying on Vercel #2391
-
SummaryHey folks, I'm migrating my app from the Everything is going smoothly so far, up to the point that I'm trying to migrate the home page. I've created a page.tsx file in the /app directory, everything is pervect locally. The build retrieves no error and shows the I've put all the details below, I hope this is helpful. Let me know if there's anything else I can provide to give more information. Cheers, Additional informationProvide environment information Link to the code that reproduces this issue To Reproduce Hey folks, I'm migrating my app from the Everything is going smoothly so far, up to the point that I'm trying to migrate the home page. I've created a page.tsx file in the /app directory, everything is pervect locally. The build retrieves no error and shows the When I deploy on Vercel, all routes work, except the homepage, which raises a 404 error. I've checked the build, there's no I've checked the outcome source. there's no index page. Here's the structure of my ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I've found the error. My I had to run Hope this is helpful for n00bs like me 😅 |
Beta Was this translation helpful? Give feedback.
I've found the error. My
PageComponent.tsx
file was originally namedPage.tsx
. When I renamed it to createpage.tsx
for the homepage, GitHub thought it was the same file.I had to run
git mv Page.tsx page.tsx
and voilà.Hope this is helpful for n00bs like me 😅