Based on the information provided in the extracts, it seems like you're encountering a common issue with Next.js where the <Html> component is being imported outside of the pages/_document file. This is not allowed in Next.js and can cause the error you're seeing.
The <Html> component is a built-in component in Next.js and should only be used in a custom Document. The Document is used to augment your application's <html> and <body> tags, and this customization is only allowed within the _document.js or _document.tsx file in the pages directory.
If you're not importing <Html> in your files, it's possible that a third-party library or package you're using might be doing so. You can try to identify this by checking the error stack trace, which should point you to the file where <Html> is being wrongly imported.
For more information, you can refer to the Next.js documentation on custom Document: **https://nextjs.org/docs/messages/no-document-import-in-page** (https://nextjs.org/docs/messages/no-document-import-in-page)
If you're using NODE_ENV=development in your environment variables, some users have reported that removing this can resolve the issue. However, this seems to be a workaround and not a definitive solution.
Please note that these suggestions are based on the information available in the extracts and might not fully resolve your issue. If the problem persists, I recommend creating an issue in the Next.js GitHub repository or seeking help from the Next.js community.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: