404 error on every page inside the app router
Unanswered
Pavement ant posted this in #help-forum
Pavement antOP
Setting my nextjs app from github, and it seems that every page.tsx file is getting ignored and giving me a "404 error", my not-found.tsx file still works, if I use the pages directory, my index.tsx files get detected, its pretty weird, I was using this repo on my laptop and its working file, I just wanted to use my PC, using bun by the way
34 Replies
Plott Hound
so going to /blog is giving you a 404?
@Plott Hound so going to /blog is giving you a 404?
Pavement antOP
and the root page
every page.tsx
its like they dont exist
Plott Hound
share the code in your root page.tsx
and your root layout.tsx
also if this is on github please share the repo link so i can try it locally to rule out your dev machine
@Plott Hound share the code in your root page.tsx
Pavement antOP
@Plott Hound also if this is on github please share the repo link so i can try it locally to rule out your dev machine
Pavement antOP
Sorry, private repo, the nextjs app works on my laptop, but for whatever reason, when I cloned it on my PC, it stopped working and just gave me 404's
Plott Hound
stupid question but did you remember to npm install after cloning?
@Plott Hound stupid question but did you remember to npm install after cloning?
Pavement antOP
yeah, bun install, using bun
only the not-found.tsx works for some reason
Plott Hound
hmm. there is nothing i can see in your code that would cause that. and the fact that its working on one machine but not the other indicates its probably an issue on your pc
did you try updating node and bun?
@Plott Hound did you try updating node and bun?
Pavement antOP
I just installed bun on my PC, but I think im on a bit older nodejs version
tho im not using node
Plott Hound
its really hard for me to diagnose without the repo.. sounds like you are doing everything correctly
Pavement antOP
yeah no, nodejs is up to date
Plott Hound
what might be different between your laptop and pc?
@Plott Hound what might be different between your laptop and pc?
Pavement antOP
Windows 10 and Windows 11 lol, thats pretty much the only difference
doesnt affect anything
Pavement antOP
By the way it did the same thing when I generated a new app
Plott Hound
sorry i have no idea what is causing this. but it doesnt sounds like an issue with next since it works on your laptop
@Plott Hound sorry i have no idea what is causing this. but it doesnt sounds like an issue with next since it works on your laptop
Pavement antOP
Thanks for trying to help anyway man
@Pavement ant By the way it did the same thing when I generated a new app
Plott Hound
did you use
npx create-next-app@latest ?Pavement antOP
yes
Plott Hound
thats so weird, it should work
last guess is to restart your pc lol
Pavement antOP
If only that fixes bugs man 😔
Plott Hound
sorry i couldnt be more help
Pavement antOP
Its fine, thanks
Pavement antOP
Update on this, after switching to node instead of bun, it somehow worked
weird because I use bun on my laptop
Plott Hound
thats good news, i tend to use node for everything because its stable but lots of people here use bun so it should be fine