Unexpected JS Resource Behavior with bootRun in Jmix 2.5.1 (Multi-Module Project)

Hey there!

I’m working on migrating quite a big, multi-module project from Jmix 1.x to Jmix 2.5.1, and I’ve run into some unexpected behavior that I couldn’t reproduce in a smaller, freshly created project.

When I run the frontend module using the bootRun task, some modules are missing at runtime. After some digging, I found that certain resources were not being loaded unless I explicitly added the @JSModule annotation. Examples include:

  • application/src/main/frontend/generated/jar-resources/src/tabsheet/jmix-tabsheet.js
  • application/src/main/frontend/generated/jar-resources/src/tabsheet/mainTabSheetConnector.ts

JS for EntityComboBox isn’t being loaded either, and I haven’t found a way to load it manually yet

Additionally, after adding the Charts addon, I noticed that the Apache ECharts library wasn’t automatically downloaded to node_modules. I had to install it manually.

Interestingly, when I run the app using the bootJar task and then execute the resulting JAR (:application:bootJar && java -jar application/build/libs/application-1.jar), everything works fine — all the resources are in place and behave as expected.

So it looks like something’s off specifically with how resources are handled during bootRun. Possibly some Gradle task is skipping or misplacing certain files during runtime.

Any ideas on what might be going wrong or where to look next?

Thanks in advance!

Hi!

Couldn’t reproduce your issue, please note that since version 2.5.0 a new Jmix run configuration is provided, which is recommended for use: What’s New :: Jmix Documentation

The vaadinBuildFrontend Gradle task is used for downloading and updating client-side dependencies. Make sure it starts in your case.

More details in the Vaadin Gradle plugin sources: flow/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinBuildFrontendTask.kt at af746ab61684fdd0c179c3a2f8affc6b40b0c2bc · vaadin/flow · GitHub

Best regards,
Dmitriy