Skip to content

setup-node@v4 fails on Alpine based containers #1293

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

Closed
1 of 5 tasks
lawRathod opened this issue May 13, 2025 · 4 comments
Closed
1 of 5 tasks

setup-node@v4 fails on Alpine based containers #1293

lawRathod opened this issue May 13, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@lawRathod
Copy link

Description:
When using actions/setup-node@v4 within an Alpine Linux-based container or environment, the action appears to install Node.js successfully and adds the binary to the PATH. However, attempting to execute any Node.js command (e.g., node --version) results in a silent failure or an error indicating a libc incompatibility. This is likely due to the Node.js binaries provided by the action being compiled against glibc, while Alpine Linux uses musl libc.

Action version:
v4

Platform:

  • Ubuntu
  • macOS
  • Windows
    (Note: The issue occurs specifically on Alpine Linux, which is not listed above.)

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Applies to all versions

Repro steps:

Expected behavior:
The node binary should be executable.

Actual behavior:
The node binary fails to execute.

@lawRathod lawRathod added bug Something isn't working needs triage labels May 13, 2025
@aparnajyothi-y
Copy link
Contributor

Hello @lawRathod, Thank you for creating this issue and We'll look into it :)

@mahabaleshwars mahabaleshwars self-assigned this May 14, 2025
@mahabaleshwars
Copy link

Hi @lawRathod,

Just to clarify — the actions/setup-node GitHub Action does not build Node.js from source, nor does it support customizing how Node.js is built or linked. Its primary role is to download and configure official pre-built Node.js binaries from the Node.js project for use in GitHub Actions workflows. These binaries are built against glibc, which is the standard C library on most major Linux distributions.

As a result, we don’t support alternative C libraries like musl, which is used in Alpine Linux.

That said, the Node.js project does offer an official Alpine container image, although it includes an unofficial Node.js build internally. These unofficial builds are statically linked against musl and may suit your needs.

If you're targeting Alpine or require statically linked binaries with musl, we recommend checking out the builds available at unofficial-builds.nodejs.org.

Hope this helps!

@mahabaleshwars
Copy link

Hi @lawRathod, a gentle reminder regarding this issue, If you need further clarification or assistance, Please let us know.

@lawRathod
Copy link
Author

Hii @mahabaleshwars!! Thanks for your reply.

I understand the problem, I spent a bit of time before realizing what was going on with my setup. Thanks for the resources, I thinking changing my workflow container is easiest to resolve this. Maybe a warning somewhere in docs would make sense and help users?

I will close this issue now. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy