Next.js Discord

Discord Forum

Dev server gets stuck on failed to compile

Unanswered
Masai Lion posted this in #help-forum
Open in Discord
Masai LionOP
My dev server seems to be getting stuck on "Failed to compile" that doesn't get fixed even after I fix the issue and the compiler actually passes on the console. It is very annoying as I use save on write.

1 Reply

Spectacled Caiman
I also used to get this issue, especially when saving a css/scss file with an error, as ts/tsx files would recover most of the time. To workaround that, I now use the recently released feature of VSC which disables auto-save on a file with an error (look for auto save no error in the settings panel). It will only save it if you use the shortcut or the menu to do so. I've never got stuck again since then.