NextJS broken when built for a production environment.
When I run npx next buld & npx next start the browser console of the web app displays all these errors, when running in dev mode it operate just fine and these errors are nowhere in site. It just kinda happened one day, it was workign fine till a client let me know issues were occuring. After checking I found this behavior and I (for now) am just having it run in dev mode to keep things working.
Solution:Jump to solution
Turns out cloud flare was caching some broken JS, purging my cloud flare cache resolved the issue immediately.
2 Replies