Vite build exited with a non zero status errors

When encountering runtime vite errors, vaadin throws an endless loop of vite exceptions that instantly fills the console history and makes it very difficult to find the original exception to find the actual error. It then becomes a game of reflexes - i.e. can one stop the app before vite can consume the console history.

Is there some way to prevent this endless exception loop?

Error occurs when using Vaadin 24.3 and 24.4.0.alpha17.

Caused by: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
        at com.vaadin.flow.server.frontend.TaskRunDevBundleBuild.runFrontendBuildTool( ~[flow-server-24.4.0.alpha24.jar:24.4.0.alpha24]
        at com.vaadin.flow.server.frontend.TaskRunDevBundleBuild.execute( ~[flow-server-24.4.0.alpha24.jar:24.4.0.alpha24]
        at com.vaadin.flow.server.frontend.NodeTasks.execute( ~[flow-server-24.4.0.alpha24.jar:24.4.0.alpha24]
        at com.vaadin.base.devserver.startup.DevModeInitializer.runNodeTasks( ~[vaadin-dev-server-24.4.0.alpha24.jar:na]
        at com.vaadin.base.devserver.startup.DevModeInitializer.lambda$initDevModeHandler$0( ~[vaadin-dev-server-24.4.0.alpha24.jar:na]
        at java.base/java.util.concurrent.CompletableFuture$ ~[na:na]
        at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec( ~[na:na]
        at java.base/java.util.concurrent.ForkJoinTask.doExec( ~[na:na]
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec( ~[na:na]
        at java.base/java.util.concurrent.ForkJoinPool.scan( ~[na:na]
        at java.base/java.util.concurrent.ForkJoinPool.runWorker( ~[na:na]
        at java.base/ ~[na:na]

Can you check your logs for earlier exceptions, probably from running npm install.

Hi Marcus, :-). That’s a bit of a catch 22 situation. I cannot check for previous errors because they have disappeared from the console history because my reflexes can’t best Vite, and I cant get rid of the Vite broken loop unless I see the original error :-)!

The problem is not that I cannot eventually find the original error - usually some TS or JS compile error, Vite just does this for most errors and therefore it is super irritating. Is there no way you can stop the infinite error loop from occurring in the first place?

I found running node_modules/vite/bin/vite.js build in the project’s root directory helpful for seeing raw vite output