Error occurred prerendering page "/404" #12246
-
I keep getting the following error when running
I don't have a custom 404 page because I want it to be handled by the Obviously If it helps, here's the code for my
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 10 replies
-
As a follow-up: I also saw this discussion #11945, but the answer doesn't help me in anyway because I do not want the error page to be static. |
Beta Was this translation helpful? Give feedback.
-
This can't be proper behavior. I created an issue for it: #12256 |
Beta Was this translation helpful? Give feedback.
-
I was able to solve it by changing the
|
Beta Was this translation helpful? Give feedback.
-
same issue here, can't solve it easily with initial props I have the same need because I am localizing my 404 page works fine otherwise, a 404 or a 500 is handled by the error.tsx, I don't see the point of trying to generate a 404 static page |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? I'm getting the same error for /500 page |
Beta Was this translation helpful? Give feedback.
-
I have similar error on prod build. I don't like the fact that Next.js doesn't report any errors during dev and then when you try to compile for prod a lot of stuff breaks. If prod doesn't compile dev shouldn't compile too. |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue when in app router. I have a |
Beta Was this translation helpful? Give feedback.
I was able to solve it by changing the
getServierSideProps
function to