"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
870
forks
source link
java.io.IOException: Cannot run program "/opt/app-root/src/frontend/node/node" #636
Trying to run npm in a docker container with alpine linux
the mvn install build runs normal until it hits the frontend-maven-plugin
The build run fine on my MacBook, the problem is only if I run it in the docker container (which I do because we use OpenShift and source-to-image from OpenShift to create Kubernetes pods)
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.5:npm (npm install) on project price-alert-backoffice-frontend: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "/opt/app-root/src/frontend/node/node" (in directory "/opt/app-root/src/frontend"): error=2, No such file or directory
If the current behavior is a bug, please provide the steps to reproduce.
created a docker image with alpine linux
mvn 3.5.0
create a pom with the frontend plugin
What is the expected behavior?
npm install works
Please mention your frontend-maven-plugin and operating system version.
Alpine Linux in a Docker container with frontend-maven-plugin 1.5 (also tried 1.4)
[INFO] Installing node version v8.2.1
--
| [INFO] Downloading https://nodejs.org/dist/v8.2.1/node-v8.2.1-linux-x64.tar.gz to /opt/app-root/src/?/.m2/repository/com/github/eirslett/node/8.2.1/node-8.2.1-linux-x64.tar.gz
| [INFO] No proxies configured
| [INFO] No proxy was configured, downloading directly
| [INFO] Unpacking /opt/app-root/src/?/.m2/repository/com/github/eirslett/node/8.2.1/node-8.2.1-linux-x64.tar.gz into /opt/app-root/src/frontend/node/tmp
| [INFO] Copying node binary from /opt/app-root/src/frontend/node/tmp/node-v8.2.1-linux-x64/bin/node to /opt/app-root/src/frontend/node/node
| [INFO] Extracting NPM
| [INFO] Installed node locally.
| [INFO]
| [INFO] --- frontend-maven-plugin:1.5:npm (npm install) @ price-alert-backoffice-frontend ---
| [INFO] Running 'npm install' in /opt/app-root/src/frontend
| [INFO] ------------------------------------------------------------------------
| [INFO] Reactor Summary:
| [INFO]
| [INFO] backoffice-parent ................. SUCCESS [ 3.249 s]
| [INFO] backoffice-frontend .................... FAILURE [ 5.257 s]
| [INFO] backoffice-webapp ...................... SKIPPED
| [INFO] docker ............................................. SKIPPED
| [INFO] ------------------------------------------------------------------------
| [INFO] BUILD FAILURE
| [INFO] ------------------------------------------------------------------------
| [INFO] Total time: 10.832 s
| [INFO] Finished at: 2017-08-02T09:51:22Z
| [INFO] Final Memory: 34M/1501M
| [INFO] ------------------------------------------------------------------------
| [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.5:npm (npm install) on project price-alert-backoffice-frontend: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "/opt/app-root/src/frontend/node/node" (in directory "/opt/app-root/src/frontend"): error=2, No such file or directory -> [Help 1]
What is the current behavior?
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.5:npm (npm install) on project price-alert-backoffice-frontend: Failed to run task: 'npm install' failed. java.io.IOException: Cannot run program "/opt/app-root/src/frontend/node/node" (in directory "/opt/app-root/src/frontend"): error=2, No such file or directory
with
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior? npm install works
Please mention your frontend-maven-plugin and operating system version. Alpine Linux in a Docker container with frontend-maven-plugin 1.5 (also tried 1.4)