eirslett / frontend-maven-plugin

"Maven-node-grunt-gulp-npm-node-plugin to end all maven-node-grunt-gulp-npm-plugins." A Maven plugin that downloads/installs Node and NPM locally, runs NPM install, Grunt, Gulp and/or Karma.
Apache License 2.0
4.26k stars 872 forks source link

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.10.0:npm #1148

Closed quoctri1 closed 5 months ago

quoctri1 commented 5 months ago

Suddenly 3 days ago I faced to this issue: [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.10.0:npm (npm install) on project system-manager-ui: Failed to run task: 'npm install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]. IDK why it's weird cause it's just happened sometimes, now I use mvn version 3.6.3, java 11, frontend-maven-plugin: 1.10.0 image A little confuse, is it require resources or something else in node config? Thank you so much!!!

eirslett commented 5 months ago

If npm install failed, then there's probably a problem with npm? You'll see it somewhere in the logs.

quoctri1 commented 5 months ago

I added verbose option in mvn that show releate to CPU thread image

eirslett commented 5 months ago

You're looking at the wrong part of the build log - try scrolling up a bit! Or send the entire build log...

quoctri1 commented 5 months ago

not really relate to plugin @eirslett or pom config, cause I built by jenkins so multiple agent pods running on the same node in k8s, so when I move it to another node the same resource it will be fine. any recommends if happend in the future?

eirslett commented 5 months ago

Maybe a firewall issue on that node?

quoctri1 commented 5 months ago

Absolutely not, cause all nodes in the same subnet, not different anything in network. Just the resources issue or containerd service cause multiple pods in the same node so hit some default litmit. BTW so hard to debug, I didn't see anything.

eirslett commented 5 months ago

Could you just nuke the node and set it up from scratch maybe?

Or less invasive, nuke the ~/.npm folder which is the npm cache, similar to the ~/.m2 folder.

quoctri1 commented 5 months ago

thank you @eirslett, I'll try with that

mMontu commented 3 months ago

Hi @eirslett , I'm facing the same issue when trying to build the sonarlint-language-server, on tag 3.7.0.75311 and 3.6.0.75231 . The issue happens regardless of using the pom.xml unchanged, or changing the configuration of frontend-maven-plugin to match the machine node and npm versions.

I've followed the suggestion above, of nuking node and set it up from scratch, and also removing ~/.npm/* and ~/.m2. This is how I re-installed node:

But the issue persists:

[INFO] --- frontend-maven-plugin:1.8.0:npm (npm install) @ sonarlint-language-server --- [INFO] Running 'npm install' in /home/developer/.build/sonarlint-language-server/src/test/resources/fake-ts-project [INFO] npm ERR! code ERR_INVALID_URL [INFO] npm ERR! Invalid URL [INFO] [INFO] npm ERR! A complete log of this run can be found in: /home/developer/.npm/_logs/2024-08-05T14_49_55_627Z-debug-0.log [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:41 min [INFO] Finished at: 2024-08-05T15:49:55+01:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.8.0:npm (npm install) on project sonarlint-language-server: Failed to run task: 'npm install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

Increasing maven verbosity leads to the same logs posted by @quoctri1.

Any ideas?