Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install on alpine is wrong #357

Open
kappelmi opened this issue Nov 25, 2019 · 3 comments
Open

npm install on alpine is wrong #357

kappelmi opened this issue Nov 25, 2019 · 3 comments

Comments

@kappelmi
Copy link

Hi
i am using this plugin on 2 instances of linux.
I have seen following error on 1 of the instance newly added to the system:

Task ':OlisWebGUI:npm_install' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Starting process 'command '/home/jenkins/slave/workspace/test/workspace/OlisWeb/OlisWebGUI/.gradle/nodejs/node-v12.13.1-linux-x64/bin/npm''. Working directory: /home/jenkins/slave/workspace/test/workspace/OlisWeb/OlisWebGUI Command: /home/jenkins/slave/workspace/test/workspace/OlisWeb/OlisWebGUI/.gradle/nodejs/node-v12.13.1-linux-x64/bin/npm install
Successfully started process 'command '/home/jenkins/slave/workspace/test/workspace/OlisWeb/OlisWebGUI/.gradle/nodejs/node-v12.13.1-linux-x64/bin/npm''
env: can't execute 'node': No such file or directory
:OlisWebGUI:npm_install (Thread[Execution worker for ':' Thread 5,5,main]) completed. Took 0.066 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':OlisWebGUI:npm_install'.

Process 'command '/home/jenkins/slave/workspace/test/workspace/OlisWeb/OlisWebGUI/.gradle/nodejs/node-v12.13.1-linux-x64/bin/npm'' finished with non-zero exit value 127

after long debugging, i have found out, the linux i am using where this is failing is alpine, and it looks like, node original distro requires libc, but alpine uses musl

analyzing the official docker image from node:alpine it looks like, there is an unofficial distro for alpine linux.

would it be possible to fix the plugin, so it would detect alpine linux and download the proper distro from node/npm ?

Thanks,
kappelmi

@kappelmi
Copy link
Author

@magro
Copy link

magro commented May 3, 2020

@kappelmi I'm experiencing the same issue on alpine, have you found a solution for this?

@deepy
Copy link

deepy commented May 3, 2020

It's because alpine uses musl and there's no official nodejs for musl.
There's some more info in the fork at node-gradle/gradle-node-plugin#51

mnlipp added a commit to mnlipp/VM-Operator that referenced this issue Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants