Reputation: 1
I have a nextjs project that I call a fake api like jsonplaceholder. everything is ok when I run dev and start it's build.
If i change the the api address to the wrong one in purpose, I get error and redirect me to the error page in development mode.
But when i try to build it i get an error that say :
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error fetch data function
I want to build project without error even with wrong api address. what should i do? I would appreciate it if you help me to solve this problem.
Upvotes: 0
Views: 48