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.22k stars 868 forks source link

Error: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.2:npm #978

Closed Qiming-C closed 3 years ago

Qiming-C commented 3 years ago

I am trying to create a CI in github action where I get a error as below:


[INFO] npm ERR! path /home/runner/work/FullStack-Demo/FullStack-Demo/src/frontend
[INFO] npm ERR! command failed
[INFO] npm ERR! command sh -c react-scripts build
[INFO] 
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR!     /home/runner/.npm/_logs/2021-06-12T20_20_12_317Z-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:38 min
[INFO] Finished at: 2021-06-12T20:20:12Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.2:npm (npm run build) on project demo: Failed to run task: 'npm run build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [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/MojoFailureException
Error: Process completed with exit code 1.

I can run `npm run build` in my local machine which works fine. but github action kept giving me error of this thing.
pi31415926 commented 3 years ago

I am facing the same issue. What's the solution then?

Qiming-C commented 2 years ago

I was ignoring the warning like unuse import this caused task failed

Uni-boy commented 1 year ago

Hi, I just faced this question, could u plz tell me how to solve this?

fono97 commented 1 year ago

I am facing this issue too now could somone help on this issue ?