Broken app router?
Unanswered
French Lop posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
The images are the router and output. Whats wrong? Im generating a static build,
My config
My config
/** @type {import('next').NextConfig} */
const nextConfig = {
output:'export',
basePath: '/public/prices',
assetPrefix: '/public/prices/',
}
module.exports = nextConfig
![Image](https://cdn.discordapp.com/attachments/1193556443266289694/1193556443664752731/image.png?ex=65ad250f&is=659ab00f&hm=cdf9ffd9d0f3f6dd434bc60f5e558078358616a15cf36442a34d7d1b2e821390&)
![Image](https://cdn.discordapp.com/attachments/1193556443266289694/1193556443949973584/image.png?ex=65ad250f&is=659ab00f&hm=11142cc4c97ee67d7b1bf84ce09a4648fd2a191cc802bf17e1cb373ba3bc9059&)
55 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
was there some update i missed?
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
what the issue are you facing? fail to build?
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
No like the /admin route is a file now?
it used to be /admin/index.html and /admin/login/index.html
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
because you have
what is inside the admin folder?
admin/page.tsx
?what is inside the admin folder?
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
/admin/page.tsx
/admin/login/page.tsx
/admin/login/page.tsx
it used to be like /admin/index.html a few months ago
(when i last compiled it
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
were you using page router?
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
yee
i think
am i stupid
how do i switch back
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
is everything working fine?
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
no
it isnt
thats the thing
theres a million different problems now
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
what is the issue?
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
whenever i click a button cause im using
router.push('/admin')
it pushed to muscatbullion.com/prices/admin/
instaed of /prices/admin.html
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
I think you don't need
basePath
and assetPrefix
there, do you?![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
i do
cause the website developer was stupid enough to route everything to /public/
i was just creating a seperate page
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
oh ok lol
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
es
es
yes*
its very annoying
cant i switch back
i dont wanna rewrite the whole frontend
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
you just migrated to app router?
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
no
it automatically did it
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
no it won't
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
ig i was using v12 back in the day
idk i just cloned this gh repo cause there was a bug
and it all started messing the hell up
note:
import { useRouter } from 'next/navigation';
im sorry if im being a pain but im honestl very confused
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
no worries
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
can i show u the live demo
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
sure
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
wait there isnt a vc
wait okay lets rewind back to the start
basically i was using app router i believe
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
ah ok
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
French LopOP
everything worked fine
but now all of a sudden everything is broken
and i have no clue why
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
where do you host the site?
have you changed anything on the server?
in this case, I think you need to remove the .html extension and trailing slash on the http server