I am trying to export my next application as a static webpage. There is ZERO SSR in this app. There should not be any attempts at implementing SSR at all. It is STRICTLY a static webpage. It gives me an error it cannot prerender '/' as 'document is not defined'. There is no code in the homepage that even remotely closely references the document. There are also no third party libraries being referenced. Obviously, since there is no relevant code, there's nothing for me to actually show. Why on earth would this tell me that 'document is not defined' if document is not being referenced? Is there a way to get more verbose output than npm run build? This is a blocker for moving us into production as we cannot get our frontend past CI/CD.
The next config marks the export as output only. This should not be locking me to SSR, so I don't even know why it's checking for this, as document WILL be defined on runtime, so this is a useless check. Even if we were referencing document somewhere, the code would work fine. Is there a way to turn this check off?