1

So I know this issue is duplicate of this issue but in my case I have created my own API with Nextjs it gives results as expected in my deployment server. But as soon as I take it to production it fails.

enter image description here

Before that I wrote everything in getStaticProps() and it worked but when I created an API from it, its failing in production. Here is the Github link for the repository

Please help, Thanks in Advance :)

Vibhav Surve
  • 73
  • 1
  • 6
  • 1
    Does this answer your question: [Fetch error when building Next.js static website in production](https://stackoverflow.com/a/66206394/1870780)? You shouldn't call an internal API route in `getStaticProps`. Instead, directly import the logic used inside your API route. – juliomalves Jan 29 '22 at 18:50

0 Answers0