I am getting this error on command screen while running 'npm run build' but 'npm run dev' is running fine and because of this I am not able to deploy this project. I am using nextJS 13
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11457:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async fetchPageInfo (/vercel/path0/.next/server/pages/index.js:1121:17)
at async getStaticProps (/vercel/path0/.next/server/pages/index.js:1041:22)
> Export encountered errors on following paths:
/
- info Generating static pages (3/3)
Error: Command "npm run build" exited with 1
Here is my source code link Github
I am stuck on it for days. Please help
I have tried a lot of things and nothing is working till now