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(TaskRunDevBundleBuild.java:189) ~[flow-server-24.4.0.alpha24.jar:24.4.0.alpha24]
        at com.vaadin.flow.server.frontend.TaskRunDevBundleBuild.execute(TaskRunDevBundleBuild.java:101) ~[flow-server-24.4.0.alpha24.jar:24.4.0.alpha24]
        at com.vaadin.flow.server.frontend.NodeTasks.execute(NodeTasks.java:341) ~[flow-server-24.4.0.alpha24.jar:24.4.0.alpha24]
        at com.vaadin.base.devserver.startup.DevModeInitializer.runNodeTasks(DevModeInitializer.java:356) ~[vaadin-dev-server-24.4.0.alpha24.jar:na]
        at com.vaadin.base.devserver.startup.DevModeInitializer.lambda$initDevModeHandler$0(DevModeInitializer.java:297) ~[vaadin-dev-server-24.4.0.alpha24.jar:na]
        at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[na:na]
        at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[na:na]
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[na:na]
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[na:na]
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[na:na]
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[na:na]
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[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