I am getting this error while deploying my app on Render
It is working fine on my local machine only getting this error while deploying.
In order to debug i have commented/Deleted part of my code still not able to get from where the error is coming. Can somebody please help
this is the logs
Generating static pages (0/7) …
Error: should not be imported outside of pages/_document.
Read more: https://nextjs.org/docs/messages/no-document-import-in-page
at x (.next/server/chunks/548.js:6:1351)
Error occurred prerendering page “/404”. Read more: https://nextjs.org/docs/messages/prerender-error
Error: should not be imported outside of pages/_document.
Read more: https://nextjs.org/docs/messages/no-document-import-in-page
at x (.next/server/chunks/548.js:6:1351)
Export encountered an error on /_error: /404, exiting the build.
⨯ Next.js build worker exited with code: 1 and signal: null
**==> Build failed ![]()
Can somebody please help what could be wrong here or is there some way i can debug this.
i have built it on NExt js**