Unable to run Hilla app

OS: Mac 13.2.1
Hilla Version: 2.0.0 - 2.0.5 (both React and Lit).
Java Version: 17 (arm)
Error: java.lang.TypeNotPresentException: Type dev.hilla.maven.EngineConfigureMojo not present

dev/hilla/maven/EngineConfigureMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Steps:

  • Run npx @hilla/cli init --auth hilla-with-auth
  • Open the project folder
  • Run project

55 means Java 11 so somehow it is running with Java 11

Running it from IntelliJ and its using Java 17

It spawns a new Maven process to generate the endpoint TS and somehow that process ueses 11 it seems. Where does your JAVA_HOME point?

My default java is 11

Is there a way to workaround this?

Try making 17 default and see if that is the problem

Just did that and it worked

But I cant leave 17 as my default as a lot of other programs require 11 to work.

Yeah it sounds lika a Hilla bug

Not sure if you can pass a JAVA_HOME env for Java 17 to the launch configuration to make it work

That didnt work