Next.js Discord

Discord Forum

next app deployed on vercel routes to /public

Answered
Polar bear posted this in #help-forum
Open in Discord
Polar bearOP
please I need help, I don't know what ive done wrong here. I've deployed my next app to vercel and it redirects to public as / please what can I do to fix this 🙏
Answered by Polar bear
I think I have resolved this. I deployed from a branch initially so the master branch was deployed on vercel with the vanilla framework. (other on vercel). thank you for your concern ser 🫡
View full answer

7 Replies

Hi, can you please share more details on this?

- Is it reading the images to the public?
- Or when you visit the index page, it redirects user to the /public route?
@Hassib Hi, can you please share more details on this? - Is it reading the images to the public? - Or when you visit the index page, it redirects user to the `/public` route?
Polar bearOP
yes the latter. I have not added images so it's only the default files that are in the directory.
Polar bearOP
I have deleted the folder and reinstalled next, still the same thing
added an index.css to the public directory and it reflects in vercel (same issue, not rendering app/page.tsx)
That's weird, can I see the codebase by any chance?
Polar bearOP
I think I have resolved this. I deployed from a branch initially so the master branch was deployed on vercel with the vanilla framework. (other on vercel). thank you for your concern ser 🫡
Answer
@Polar bear I think I have resolved this. I deployed from a branch initially so the master branch was deployed on vercel with the vanilla framework. (other on vercel). thank you for your concern ser 🫡
Oh yes this is the cause. If you want to keep both branches you have to override the build configuration with vercel.json in the non-prod branch