[Got It] How Vaadin tries to identify an installed nodejs (Linux)?

I have a jenkins slave and have untared node 16 under /home/jenkinsuser/.vaadin. The binary is in path and callable from the shell.

But when the build starts, I receive the following:
[INFO] --- vaadin-maven-plugin:23.3.5:prepare-frontend (default) @ nok40-va --- [ERROR] Command '[/home/svcjenkins/.vaadin/node/node, -v]' failed with exit code '1' [INFO] Couldn't find node. Installing Node and npm to /home/svcjenkins/.vaadin.
It installs node 18 then, in exactly same place where “my” node16 resides. Calling node then fails as it is an CentOS 7, and nodejs needs newer glibc than CentOS provides.

Yet I don’t have any idea why it doesn’t recognize the availably node. Any ideas what else I could try? If I don’t get it this way, I still can install a global nodejs but that is more or less the last resort I have considered…

What 16.x are you using? And is node + npm callable from command line? Are you sure you access the slave with the same permission as the build? Like are you sure the java / maven running process is able to use the same shell/path like you?

Note that the user running Jenkins is not necessarily the same as the one that’s starting the build process

Yes I know. It is all the same user, I have checked that. And node / npm is callable from shell… Latest 16 available.

All questionable files and directories belong to that user, therefore I really wonder… Thought perhaps a specific directory or file is checked if available, instead of just checking if node is callable.

Will investigate further, but only today :grin: in case I fail I’m going to try the global installation tomorrow morning

One step further!

I have missed to recreate a symbolic link within ~jenkinsuser/.vaadin/node - there belongs node pointing to node/bin/node

but now:
[INFO] --- vaadin-maven-plugin:23.3.5:prepare-frontend (default) @ nok40-va --- [INFO] Updating current installed node version from 16.19.0 to 18.13.0 [INFO] Node 16.19.0 was installed, but we need version v18.13.0 [INFO] Installing node version v18.13.0
I expected that Vaadin 23 needs minimum node 16.15 as in the release notes…??

Well Vaadin thinks that the node was installed by Vaadin :grimacing: and Vaadin trys to automatically update it’s own node

This happened because you used the exact location Vaadin adds its installed node

Maybe… then “ouch”

but this message but we need version v18.13.0
sounds to me more that the requirements have been changed a bit…

No no you are good with 16.latest :sweat_smile: they just changed some month ago from “take the minimum version available in .Vaadin” to “update and require the latest supported version inside .Vaadin to make sure people have a secured nodejs env if automatically installed / managed by Vaadin”



means this or that way, I’m going to install it globally.
well, at least a result :smile:

Would be the easiest :grimacing:

I’ve created my own docker container to run my builds in where I can manage java, maven and nodejs freely

I’m free to play at this slave as I wish or need as it is our teams “Linux Slave” for Jenkins. Different Java and Maven versions used by the Jenkins controller, all fine so far, managed by Jenkins file.
Only that node has annoyed me today :slightly_smiling_face:

But as I don’t see any projects demanding a specific node version nor any plans in the very near future to upgrade to Vaadin 24 a global node 16 is more or less ok I think.

Whenever node 18 has to be a must then either docker or Linux distribution Upgrade to RH 8

We had similar problems with a lot of projects needing different stuff… in the end our Jenkins Admin gave as a docker host / agent and there we could deploy our build agents :sweat_smile: I find this way better for isolation and different requirements per team

Indeed! But as we are a pretty small team compared to others in our company, and we have our own Jenkins which I am allowed to administrate, I’m fine with this.

We are the only ones creating / maintaining Vaadin projects, so everything is cool :slightly_smiling_face:

Installed global node v16.18.1
wondered why still no success…


Here I also need to run sudo yum install npm.x86_64