After build dynamic routes are throwing 404. #13073
Unanswered
singhpriyakr
asked this question in
Help
Replies: 1 comment
-
In your first Link, try replacing href with actual page (like your 3rd Link) and also use passHref. For example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Every thing was working fine on local development, once my app done I run the
next build
once it done and when I tried build on browser most of the dynamic routes were throwing 404 and that was very weird.To Reproduce
next build
Expected behavior
Screenshots
Screen short of the build output




Screen short of the 404 output
Screen short of how I am using link tag
Screen short of how I have the folder structure
System information
Additional context
Even tried changing sequence of
href
andas
, also tried remove prefetch and adding but output remains same. Is't it very strange, even though you are doing everything right but getting 404 in browsers for all the links. Sad :(#Update
I tired removing tag and tried to handle via Router.push
eg:
openCouponPage = (url) => { Router.push('/coupon/[id]', url); }
But this is also not working.
Beta Was this translation helpful? Give feedback.
All reactions