Vaadin V24 node modules get deleted after build

I upgraded from v23.3.5 to v24 (tested with 24.1.11 and 24.2.0). Before the upgrade i deleted the node_modules and files like the package.json/package-lock.json… (vaadin dance)
After a successful build (mvn clean install -DskipTests -Pproduction) the node_modules folder gets removed. with the next build it takes alot of time since all the modules are loaded again.

Am I missing something or was there a change and it is intended?

Vaadin 24.1.11
Spring-Boot 3.1.4
Java 21 (corretto)
Maven 3.9.2

maven plugin:


Yes, it’s called pre-compiled frontend bundle and is available for dev and production mode. I would highly recommend to checkout the latest example, the generated pom.xml and the docs.

thanks for the reply. yes i already compared the example and updated my pom.xml accordingly. Can you link me to the docs that describes this so i might understand it better? havent found anything so far.
Looks like it works as soon as there is a package.json. The initial build takes about 3 Minutes and every build after that about 30 seconds (which is good since its about twice as fast as v23). but as soon as I delete the package.json the node_modules get deleted after a succesful build and every build takes 3-4 minutes. In the past we havent commited the package.json to the VCS, but now it seems not to change that much right? Is it supposed to be commited?

Do NOT delete those files, those should be committed.

It was never recommended to not commit them there you can find “Since V24”

A similar notice should be on the production mode docs page

perfect. thanks alot!