Node_modules download directory

Hello everyone,

I have a working project made in Vaadin 14.4.2. Then I decided to paste this project into multi-module project (together with backend made in Java).
After that, it stopped working. With an error (attached).

I can see that now it doesn’t download the files into submodule directory, but they are being downloaded to the root project path. I assume that is the main problem.
The files that are downloaded are:

  1. node_modules folder
  2. package.json
  3. package-lock.json
  4. webpack.config.js
  5. webpack.generated.js

What dependency should I add to build.gradle so it downloads those files into it’s own submodule (hopefully that will work)?
I enclose new project (build properly) - https://github.com/szymonkat/CryptoApp
Any suggestions are welcome…

18554955.png

Hi,

I’m not really sure how your multimodule should work but in my opinion:
You should only have 1 spring boot application = one application.properties.
you should only have the front module that depends on Vaadin not the backend.

One issue I can see is the frontend folder in a jar module should be in the resources ( like here https://github.com/jcgueriaud1/multimodule-spring-vaadin-app/tree/main/ui-module/src/main/resources/META-INF/resources/frontend

You also have a good example of a multi module project here: https://github.com/TatuLund/bookstore-flow-ee/tree/master/bookstore-starter-flow-my-component

Unfortunately it’s a maven project ( like the previous link)