Vaadin 14: vaadin-maven-plugin can't find npm.cmd

I tried to use the Vaadin 14 archetype to create a new Vaadin project. Creating the project works, but building it fails because it can’t find the npm.cmd tool:

[ERROR]
 org.apache.maven.cli.MavenCli - Failed to execute goal com.vaadin:vaadin-maven-plugin:14.0.4:prepare-frontend (default) on project vaadin-app:
[ERROR]
 org.apache.maven.cli.MavenCli -
[ERROR]
 org.apache.maven.cli.MavenCli - ======================================================================================================
[ERROR]
 org.apache.maven.cli.MavenCli - Failed to determine 'npm.cmd' tool.
[ERROR]
 org.apache.maven.cli.MavenCli - Please install it either:
[ERROR]
 org.apache.maven.cli.MavenCli - - by following the https://nodejs.org/en/download/ guide to install it globally
[ERROR]
 org.apache.maven.cli.MavenCli - - or by running the frontend-maven-plugin goal to install it in this project:
[ERROR]
 org.apache.maven.cli.MavenCli - $ mvn com.github.eirslett:frontend-maven-plugin:1.7.6:install-node-and-npm -DnodeVersion="v10.16.0"
[ERROR]
 org.apache.maven.cli.MavenCli - ======================================================================================================

I do have node installed and npm.cmd on the path:

C:\dev\tmp\vaadin-app>where npm.cmd
E:\Programme\nodejs\npm.cmd

C:\dev\tmp\vaadin-app>npm.cmd -v
openssl config failed: error:02001003:system library:fopen:No such process
openssl config failed: error:02001003:system library:fopen:No such process
6.9.0

C:\dev\tmp\vaadin-app>node -v
v10.16.3

C:\dev\tmp\vaadin-app>

To create and run the project, I used the following command:

mvn -B archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=14.0.4 -DgroupId=org.test -DartifactId=vaadin-app -Dversion=1.0-SNAPSHOT && cd vaadin-app && mvn package jetty:run

How can I fix this problem and can get started with Vaadin 14?

I have experienced this too. I have the newest versions of node and npm installed globally, and my project has been built many times before, but sometimes this error still happens when installing. What I did then is simply re-run the install - it usually works the second time.

I have no idea what’s going on there.

Thank you for your response!

Sadly I’ve run it many times now and it never worked.

Hi, anyone has a solution to this?