Vaadin Maven plugin: npm version

Our project uses several Vaadin dependencies and the vaadin-maven-plugin. These use version 24.6.6. When we upgrade these to 24.7.4 then we get an error in our Jenkins build:

[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:24.7.4:prepare-frontend (default) on project back-office-ui: null: MojoFailureException: InvocationTargetException: Could not execute prepare-frontend goal.
[ERROR] Your installed ‘npm’ version (9.5.1) is too old. Supported versions are 9.6+
[ERROR] Please install a new one either:
[ERROR] - by following the Node.js — Download Node.js® 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.10.0:install-node-and-npm -DnodeVersion=“v22.14.0”

However, we have the following version installed:
npm -v → 9.6.7
node -v → v18.17.1

So, we should be ok.

Even when we unzip https://nodejs.org/dist/v22.14.0/node-v22.14.0.tar.gz to a folder ‘node’ in the Jenkins home directory ‘.vaadin’, the error remains. Executing ‘mvn com.github.eirslett:frontend-maven-plugin:1.10.0:install-node-and-npm -DnodeVersion=“v22.14.0”’ in our build is not an option.

Please advice.

Looks like a hiccup in the error message. Node is your problem. NodeJS 20+ is required

Edit: the docs update with the requirement is still open :grimacing: chore: Upgrade supported Node.js to 20 by mshabarov · Pull Request #4257 · vaadin/docs · GitHub

If you run maven with -X you should see where the offending npm executable is located.
Vaadin plugin should print something like Using npm 9.5.1 located at /some/path/to/npm

The version is used is located in [JENSHINS_HOME]\.vaadin\node
According to the timestamp, it’s a new version but doesn’t seem to be picked up.
The version for that node instance returns v22.14.0

When we switch back to version 24.6.6 than everything seems to be fine. I can also see that the previous version of node is put back in [JENSHINS_HOME].vaadin\node. I’m not entirely convinced that the Vaadin plugin is using the npm version in [JENSHINS_HOME].vaadin\node even if the option -X for Maven says it does.