Next.js Discord

Discord Forum

404 NOT FOUND

Answered
Yellowstripe scad posted this in #help-forum
Open in Discord
Yellowstripe scadOP
Hello everyone,

I'm getting 404 Not Found error when trying to access any page after deployment while it worked in local. I'm using nextjs latest version.

my index is in /app/index.tsx

and my other pages are in /app/{pagename}/index.tsx

Any idea what's going on?



NB: Using directory listing in Vercel's advanced settings will only list files in /public folder

thanks
Answered by Yellowstripe scad
Got a reply from vercel support. this solved the issue.
View full answer

58 Replies

@Carolina Dog Ofcouse, that's the file convention for NextJS Pages Router. When using the App Router, the file name should be index: `app/page.tsx` other file: `app/{pagename}/page.tsx` For more information, read the docs.
Yellowstripe scadOP
I tried that, it didn't work neither. Same error.
Carolina Dog
What nextjs version are you using?
@Carolina Dog What nextjs version are you using?
Yellowstripe scadOP
As I said, everything works perfectly in local
@Yellowstripe scad As I said, everything works perfectly in local
can we see the repo or the root folder structure?
@alfon can we see the repo or the root folder structure?
Yellowstripe scadOP
there you go

thank you guys for trying to help
@joulev you mean this error? i think you didn't deploy the app successfully; the code itself looks fine
Yellowstripe scadOP
could this be the issue ? if so, how do I solve it ?
I thought the deployment worked because it says 'ready'
@Yellowstripe scad could this be the issue ? if so, how do I solve it ?
Southern rough shrimp
If u get error that mesns its not good
Fix the errors
@Yellowstripe scad could this be the issue ? if so, how do I solve it ?
the top error is i think harmless, i've seen it a couple of times and everything still works fine with it
the bottom error is interesting however; it may be causing this
if you have ensured that the log doesnt have any secret exposed in it, can you disable this and send me the deployment page URL?
so i can see the whole log
@joulev if you have ensured that the log doesnt have any secret exposed in it, can you disable this and send me the deployment page URL?
Yellowstripe scadOP
it seems to be related to my database (supabase) I don't get how this could be an issue that would cause this
@Yellowstripe scad where is this setting ?
Yellowstripe scadOP
Got a reply from vercel support. this solved the issue.
Answer
nice
Yellowstripe scadOP
thanks for the help @Carolina Dog @joulev @alfon

@Southern rough shrimp don't listen to the console blindly lol but thanks for helping
@Yellowstripe scad Got a reply from vercel support. this solved the issue.
Southern rough shrimp
Where did u contacted vercel
I also want to
@Southern rough shrimp Where did u contacted vercel
Yellowstripe scadOP
Life's gonna be pretty hard on you if you can't google 'vercel support '
Yellowstripe scadOP
it's the first link
Southern rough shrimp
But they redirect me to vercel github community
Yellowstripe scadOP
go to the link i sent
Southern rough shrimp
@Yellowstripe scad go to the link i sent
Southern rough shrimp
See
Yellowstripe scadOP
how about this ?
scroll or try on browser
@Southern rough shrimp Where did u contacted vercel
only available to paid plan users
Yellowstripe scadOP
oh my bad then
sorry, let me know if I can help
@Yellowstripe scad oh my bad then
Southern rough shrimp
You have paid plan?
Yellowstripe scadOP
yes
Southern rough shrimp
😦
My issue was related to cloudflare being paid when i enabled im under attack it breaks my website and returns 500 server error
:fine: seems like issue gonna never be solved
Yellowstripe scadOP
create a ticket with more info and send it
creating a ticket is also only possible for paid users
free users need to go to vercel discussions
Yellowstripe scadOP
i meant a ticket here on discord
well he did ask here on discord. but with just that much information no one is able to help
besides it's not related to nextjs anyway
so i recommend that he goes to vercel discussions
@joulev besides it's not related to nextjs anyway
Southern rough shrimp
Its related to Vercel ya
I have posted on Vercel discussion too
No one repleis their
Yellowstripe scadOP
well give more info
and nextjs != vercel; this is not a vercel support server
Southern rough shrimp
:fine:
Probably i have to move my project away from vercel