I'm building an app with NextJs and Typescript. I'm trying to run next build (yarn build
) on my local machine to check for typescript warnings and build errors before deploying.
Next build hangs at 'Creating an optimized production build' and hangs forever. Don't even know where to start to address this issue. Can anyone help with this?
Could be a cache issue.
I'd start by removing /.next
folder, if it didn't work then both /.next
and /node_modules
. Whenever you have issues with Next you don't know how to approach or it's just acting weird - removing /.next
will solve most of the problems.
Have found the solution to the issue. Apparently the build freeze was caused by empty files located all over my project directory. Removed all of them and next build runs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With