CommandNotFoundException: No valid executable found


2023-11-17T13:40:12.117+01:00 ERROR 22572 --- [io-8080-exec-10] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [com.vaadin.flow.server.Service
Exception: java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Failed to configure Hilla engine] with root cause

dev.hilla.engine.commandrunner.CommandNotFoundException: No valid executable found
at dev.hilla.engine.commandrunner.CommandRunner.lambda$run$0( ~[engine-core-2.3.2.jar!/:na]
at java.base/java.util.Optional.orElseThrow( ~[na:na]
at ~[engine-core-2.3.2.jar!/:na]
at dev.hilla.internal.AbstractTaskEndpointGenerator.prepareEngineConfiguration( ~[engine-runtime-2.3.2.jar!/:na]
at dev.hilla.internal.AbstractTaskEndpointGenerator.getEngineConfiguration( ~[engine-runtime-2.3.2.jar!/:na]
at dev.hilla.internal.TaskGenerateOpenAPIImpl.execute( ~[engine-runtime-2.3.2.jar!/:na]
at com.vaadin.flow.server.frontend.NodeTasks.execute( ~[flow-server-24.2.0.jar!/:24.2.0]
at com.vaadin.base.devserver.startup.DevModeInitializer.runNodeTasks( ~[vaadin-dev-server-24.2.0.jar!/:na]
at com.vaadin.base.devserver.startup.DevModeInitializer.lambda$initDevModeHandler$0( ~[vaadin-dev-server-24.2.0.jar!/:na]

Looks like it can not find mvn on your PATH, or the mvnw wrapper in the current folder.

I can see a similar issue on my environment when starting the application from the IDE and not having a maven wrapper (or having the Hilla application in a maven submodule, so the wrapper is in a parent folder)
This happens to me because, I have maven managed by sdkman so IDEA cannot find it in the PATH, as Sascha said

Anyway, it would be nice to be able to provide an additional executable for MavenRunner as a system property

@versatile-zorse, if you can, please consider opening a ticket about sdkman incompatibility with Hilla.