Vaadin 24.5.4 Production mode View with dynamic created Grid JS Console errors

I have Vaadin 24.5.4 application in production mode (<vaadin.productionMode>true</vaadin.productionMode>), OpenJDK 17.0.13-12, nodejs 20.18.0. When I navigate to my view with dynamic created Grid I see the following in JavaScript console:

If I active view with static grid and switch to the view with dynamic Grid, everything is ok:

What is wrong? Any hints are welcome.

This looks similar to this recent issue Production build breaks future development · Issue #20294 · vaadin/flow · GitHub, but that issue was in having errors in dev mode after production build.
Could you please try deleting src/main/bundles folder, clean build/target folder, delete src/main/frontend/generated and build for production once again?

By the way, productionMode parameter has no effect anymore since some older Vaadin 24 version. build-frontend maven goal is what needed for production build, see skeleton-starter-flow-spring/pom.xml at 897c82c2e2e5b118f70c37384acf4500f68817ab · vaadin/skeleton-starter-flow-spring · GitHub.

1 Like

In my case it has been solved by adding @LoadDependenciesOnStartup with used component classes to my application.