Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin javascript files not found for spring boot app

Al Dispennette
3 years ago Nov 07, 2019 9:37pm
Al Dispennette
3 years ago Nov 08, 2019 6:32pm

So far what I've learned:

  1. The application works locally because the generated files are created on application start up
  2. The build server is building the app but not generating any of the directories or files that are generated at app startup
  3. If I generate the package.json and target directory I can then use the com.moowork.node gradle plugin to run npm install to generate the node_modules directory and package-lock.json
  4. This however leads to the following error
ERROR in ../target/frontend/generated-flow-imports.js?babel-target=es6
Module not found: Error: Can't resolve '@vaadin/flow-frontend/contextMenuConnector-es6.js?babel-target=es6' in
  1. I can get rid of this error if I remove all of the generated files and folders and start the app using bootRun to regenerate all of the files and folders.

So here is my problem, I should not be putting generated files into source control. The build should just generate them and that be the end of it.
I have been going through the source for the maven plugin and trying to determin how the target directory is generated so I can do it in my gradle project but its an extremely slow process. Is there a gradle plugin that is equivalent to the maven plugin so that I can just run the prepare-frontend task? The two gradle plugins that I have seen so far are nearly useless for anything other than initialization.

I would very much appreciate any assistance I could get.

Al Dispennette
3 years ago Nov 12, 2019 10:58pm
Al Dispennette
3 years ago Nov 21, 2019 12:03am