Vaadin Eclipse plugin requires Node?

Hi!

I’m about to try Vaadin 14 (from Vaadin 8). I’ve installed the Vaadin Eclipse Plugin. After restarting, I created a new Java EE project. Then, I got the following error:

[INFO]
 Scanning for projects...
[INFO]
 
[INFO]
 --------------------< com.v2com.light:vision-light >--------------------
[INFO]
 Building vision-light 1.0-SNAPSHOT
[INFO]
 --------------------------------[ war ]
---------------------------------
[INFO]
 
[INFO]
 --- vaadin-maven-plugin:14.0.12:prepare-frontend (default-cli) @ vision-light ---
[ERROR]
 Command '[which, node]
' failed with exit code '1'
[INFO]
 ------------------------------------------------------------------------
[INFO]
 BUILD FAILURE
[INFO]
 ------------------------------------------------------------------------
[INFO]
 Total time: 1.568 s
[INFO]
 Finished at: 2019-11-11T11:51:10-02:00
[INFO]
 ------------------------------------------------------------------------
[ERROR]
 Failed to execute goal com.vaadin:vaadin-maven-plugin:14.0.12:prepare-frontend (default-cli) on project vision-light: 
[ERROR]
 
[ERROR]
 ======================================================================================================
[ERROR]
 Failed to determine 'node' tool.
[ERROR]
 Please install it either:
[ERROR]
   - by following the https://nodejs.org/en/download/ guide to install it globally
[ERROR]
   - or by running the frontend-maven-plugin goal to install it in this project:
[ERROR]
   $ mvn com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm -DnodeVersion="v12.13.0" 
[ERROR]
 ======================================================================================================
[ERROR]
 -> [Help 1]

[ERROR]
 
[ERROR]
 To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR]
 Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
 
[ERROR]
 For more information about the errors and possible solutions, please read the following articles:
[ERROR]
 [Help 1]
 http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Does Vaadin requires NodeJS now for developing? I refuse to believe it…

Thanks for any pointers about developing with Vaadin 14 WITHOUT touching NodeJS/JavaScript. Thanks!

Node is used under the hood to build what was used to be called widgetset in Vaadin 8 (and was used to be handled by GWT). That is fully automated, so no need to touch any JS stuff directly.

Thanks for your response, Joonas!

I’d like to avoid installing Node altogether - you can notice I don’t have it installed.

Would that second option presented (mvn com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm -DnodeVersion=“v12.13.0”) not install Node in my machine, but would start/stop it as need by the maven build routine?

Or, like in Vaadin 8, you could compile the widgetset once and be done with it (and force regeneration if needed). Is there a way to get the “widgetset” compiled in another machine and imported as a dependency?

Well, that second option presented (mvn com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm -DnodeVersion=“v12.13.0”) doesn’t install Node in my machine as a whole, but I still didn’t understand how/when Node is ran - it seems that while I’m in tomee:run, it is still talking to Node?

And I’m getting build errors related to Node AFTER Thorntail (which I use instead of TomEE) is up (using mvn thorntail:run)

2019-11-12 11:05:10,409 INFO  [dev-updater]
 (ServerService Thread Pool -- 4) 

  Failed to find the following imports in the `node_modules` tree:
      - @vaadin/flow-frontend/contextMenuConnector-es6.js
      - @vaadin/flow-frontend/gridConnector.js
      - @vaadin/flow-frontend/contextMenuConnector.js
      - @vaadin/flow-frontend/flow-component-renderer.js
      - @vaadin/flow-frontend/gridConnector-es6.js
      - @vaadin/flow-frontend/vaadin-grid-flow-selection-column.js
  If the build fails, check that npm packages are installed.

Anyways, I’ll stick with 8 for now; I’ll need more time to understand how different the 14 world is…

Thanks!

\u0000Hi Leo!\n\nnpm was also needed with V10-13, but there\n\n a) it was not needed in development mode\n b) it was automatically downloaded by the Maven plugin\n\nNow, with V14, it is still not needed by the server, except in development mode, when it is constantly trying to give you an optimized client side bundle, based on what components you are using. Also it is not installed automatically anymore \uD83D\uDE2C\n\nI agree we should make Vaadin download npm automatically if it is not found on the computure. There is also a ticket about "default widgetset" aka pre-packaged bundle. That would allow developing completely without npm and it would also make it much faster to develop with V14. Our core team will soon focus on improving the developer experience of the npm based build, so you can expect some enhancements for this soonish.\n \ncheers,\nmatti\n