mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #973] Issue: exec: "node": executable file not found in $PATH: unknown #570
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#570
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @grahamb on GitHub (Jan 27, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/973
System information
act: ghcr.io/catthehacker/ubuntu:act-latestactversion: 0.2.25~/.actrccontents:Expected behaviour
A workflow that includes
actions/setup-node@v2should successfully install the desired version of NodeJSActual behaviour
The
actions/setup-node@v2action fails with an error:exec: "node": executable file not found in $PATH: unknownPossible duplicate of #834
Workflow and/or repository
Sample repo: https://github.com/grahamb/node-actions-test
workflow
Steps to reproduce
act workflow_dispatchactoutputLog
Additional information
This workflow works normally on a github.com hosted runner:
Log
This action also works fine on a self-hosted runner (a RHEL7 with only Docker 20.10.6 installed, node is not installed on the host):
Modified self-hosted workflow file:
workflow
output
This comment in #834 seems to indicate that the images that
actuses should have node installed, but that doesn't seem to be the case (at least not with the medium and micro images; I don't have enough free space on this VM to try the full image).@opr commented on GitHub (Jan 28, 2022):
Probably not helpful to you, but it could help others: I was getting this error. I'm on Mac OSX and I just ran
brew install actand the error went away.@catthehacker commented on GitHub (Jan 28, 2022):
container:is not yet supported (as in, it will run in a container, but you won't getnodeand other stuff that GHA mounts into that container for it to work properly)@grahamb commented on GitHub (Jan 28, 2022):
Well, that would explain it. Would you consider adding this limitation to the known issues section of the readme? It would have saved me a few frustrating hours yesterday.
@ZauberNerd commented on GitHub (Feb 1, 2022):
Duplicate of #917
@JJRcop commented on GitHub (Feb 24, 2022):
Is this closed because it's a duplicate or because it's fixed? I assume duplicate, but want to make sure.
@iTrooz commented on GitHub (Aug 19, 2023):
Hello, I think #917 was not a duplicate (I'm not sure why it was considered as so, as #917 is about using docker as a step, and this issue is about putting node inside containers)
Could you reopen, and point it out in "known issues" ?
(I can still reproduce this as of 0.2.34 using the author's instructions)
@ChristopherHX commented on GitHub (Aug 22, 2023):
Yeah this issue is unrelated to 917.
However changing this would be a lot of work and would reduce platform support to what GitHub supports so I would suggest to keep current behavior for platforms not supported by GitHub.
@iTrooz commented on GitHub (Aug 22, 2023):
I don't understand, what are "platforms that github supports" ?
I thought I was able to use any container image I wanted, and github would somehow inject a nodejs runtime in it. Is that not the case, are popular container images manually patched by github's team ?
@ChristopherHX commented on GitHub (Aug 22, 2023):
No, that's not the case. You cannot use i386 (node actions won't work, partially working), arm64 and armv7 containers on a x86_64 runner.
This works in act, by providing
nodeinPATHNo, not patched.
act works also on freebsd, plan9, solaris, openbsd, dragonflybsd and on riscv, i386, ppc64, mips64...
I point that out in my downstream project github-act-runner under Known limitations, but not in act itself. I didn't introduce this in act.
@iTrooz commented on GitHub (Aug 22, 2023):
I'm not sure I understand why we are talking about architecture
How does github does that in container images ? And couldn't you also do that ?
@ChristopherHX commented on GitHub (Aug 22, 2023):
Each release comes with node binaries in an external tool folder, which it bind mounts into the container.
Then it uses the full path to external tools mount node tool.
Yes, I never said impossible. Only much work.
@NNNNzs commented on GitHub (Oct 9, 2023):
i have same problem,Have you solved it yet?
@dimaqq commented on GitHub (Nov 17, 2023):
I wonder if I'm hitting the same problem:
The 3rd party action.yaml has this code:
Paths under
distseem OK.Somehow, the
mainsection succeeds, but thepostsection fails with:Real GHA: OK
actx84-64 host: I can't testactARM 64 host: Fail (I'm usingact --container-architecture linux/amd64and relying on Docker Desktop / Rosetta to run foreign arch)@dimaqq commented on GitHub (Nov 17, 2023):
I made a MRE for my flavour of this issue: https://github.com/dimaqq/mre-973
@shqear93 commented on GitHub (Jan 1, 2024):
I have the same issue here
@billyjbryant commented on GitHub (Jan 2, 2024):
I'm experiencing this same issue no matter what source image I use, my own or the act provided images.
@virzak commented on GitHub (Jan 3, 2024):
Use this code to install node:
If you need
yarntoo, see this implementation.@github-actions[bot] commented on GitHub (Jul 2, 2024):
Issue is stale and will be closed in 14 days unless there is new activity
@iTrooz commented on GitHub (Jul 2, 2024):
Issue is stale but still present/problematic
@glimchb commented on GitHub (Jul 10, 2024):
The node binary is just not in PATH
If you add it to PATH , all works fine
@iTrooz commented on GitHub (Jul 10, 2024):
Yes, but this mean modifying the workflow to manually install node just for
actto work, which may not be wanted@glimchb commented on GitHub (Jul 10, 2024):
in my image node was already present, so this did a trick for me
which is - I agree, less then ideal, because we have to modify the workflow just for ACT...
this PR #1503
allows to set custom ENV in the docker image like this:
I'm looking now if we can use
act --envor something like that to set this externally without modifying workflow or base image...@ChristopherHX commented on GitHub (Jul 10, 2024):
@glimchb commented on GitHub (Jul 10, 2024):
@ChristopherHX so is this a recommended workaround for now ?
just making sure...
@techanfa commented on GitHub (Nov 5, 2024):
+1, this basically makes it impossible to use any action/XXX without having a container that has node installed, and as many people mentioned, it feels like an anti-pattern to change your workflow so that it works locally when it already works on the hosted github runner.
@glimchb commented on GitHub (Nov 5, 2024):
we found this workaround eventually to avoid changing the code:
@ChristopherHX commented on GitHub (Nov 5, 2024):
development of act is running on a low flame, imho community code reviewers needed added as members.
Imagine throttled development due to code review requirement set up by the inactive owner.
/home/runner/externals/node20/bin is not part of every docker image.
You can run actions/runner locally like act as of 2021 just google runner.client, it's only a question of tooling
@kaiserkiwi commented on GitHub (Mar 5, 2025):
I read this thread but I still don't really know how to solve this.
My
.actrclooks like thisAnd the step that fails in my Workflow-File looks like this:
The relevant part in the Terminal output is the following:
Is there any solution to get this running without modifing the Workflow file just to make it run with act? I have dozens of projects with dozens of workflows in many of them, so this would be pretty annoying and hard to sell for my team at work.
@ahuret commented on GitHub (Mar 11, 2025):
@kaiserkiwi to resolve it add a step to install node in your container. For example if your container is some fedora image, add a step
Issue is about
actthat doesn't mount some programs (as node) in the custom image container as GHA does, so to resolve it just need to install it in this custom image container by yourself. Indeed, it will make the workflow different when it runs with act vs GHA but it's workaround for act to work in thatcontainer:context.@joshunrau commented on GitHub (Apr 14, 2025):
@bnthn commented on GitHub (May 6, 2025):
In my case the
runs-onimage broke while updating my Gitea Act Runner docker image from 2.5 to 2.11. I received the error running pipelines on catthehacker/ubuntu:act-latest, which was weird, since i hadn't touched that image. Apparently there can be inconsistencies of some kind that remove node from the container completely.After removing the image from the build machine with
docker rmi catthehacker/ubuntu:act-latestand let the Act Runner pull it again everything works fine again.@marco-brandizi commented on GitHub (Aug 4, 2025):
I am on a Mac/ARM, I was getting this error with
--container-architecture linux/amd64, which is suggested by act itself. The error went away when I started omitting this option and letting it to use the ARM architecture.@CasparNuel commented on GitHub (Oct 29, 2025):
@ChristopherHX Has any progress been made on this issue?
Running jobs on containers that are tool-specific is a major pain currently.
Some jobs simply need to run in a container that only provides a very minimal set of tools (and do not provide a
nodeexecutable).This makes it so that actions like
actions/checkout@v4oractions/upload-artifact@v4can never work in such scenarios. The only possible option would be to recreate the container using an environment that does provide anodeexecutable, or to install thenodeexecutable in the container (this isn't always possible at all). This creates major overhead for jobs that run on specific containers that cannot providenode.IMO, support for injecting
node(and other required tools) into jobs running in acontaineris truly a requirement foract.Since this issue was created in 2022 I hope there is a plan to implement this at some point? This really is a core feature for runners.
@ChristopherHX commented on GitHub (Oct 29, 2025):
No maintainer can work on nektos/act right now, only owner cplee can. A merge helper GitHub Application insists on config updates that requires an admin to apply the changes.
I did a full stop at writing PRs to nektos/act due to this.
I have written a program that does something like that implicitly in 2021, by letting you execute https://github.com/actions/runner locally with a local workflow definition file similar, but totally different implemented than act.
No
I fear that the future of the nektos/act repository is unknown.
See my profile for a link to my current hard fork of act.
Due me me working on the gitea project as of recently, my plan is to turn into an mirror like repository hosted in the future on gitea.com.
@electrofelix commented on GitHub (Jan 29, 2026):
Looks like part of the underlying problem is that the default
PATHenvironment differs between the default runner images and what is observed with GitHub hosted runners.Extending the current medium image to have a separate user I noticed that the message about

<userhome>/.local/binpersistsBut comparing this to the real behaviour in GitHub, informed that the path is already added.
Any github action installing tools that makes is relying on the assumption that the default
userinstallationbindir is in the path is going to break when run via act.@electrofelix commented on GitHub (Jan 30, 2026):
Following https://github.com/nektos/act/issues/973#issuecomment-2457979468 and https://github.com/nektos/act/issues/973#issuecomment-2221196172 and extending to cover additional paths seems to be the best fix for this currently.
The github runner images helper scripts all modify
/etc/environmentgithub.com/actions/runner-images@1b0ec730f6/images/ubuntu/scripts/build/install-python.sh, but it appears docker run ignores any updates to such a file.One option might be for act to always explicitly source this file for linux/macos container runners rather than relying on the docker build settling anything needed via
ENV.@ChristopherHX commented on GitHub (Jan 30, 2026):
I was in favor of this code removal due to
yes older versions of act did somehow interpret /etc/environment
Now the act images interpret /etc/environment on build time instead of runtime backed into the Env metadata.
The user specfic env might live in a profile source folder? If you alter the user such path becomes outdated.
@ChristopherHX commented on GitHub (Jan 30, 2026):
To clarify I thought this issue is about images that do not contain a
nodeexecutable that are not especially made for act.Those images would not have the node executable in /etc/environment, since GitHub Actions usually brings it's own node copy via bind mounts that act does not do right now.
@electrofelix commented on GitHub (Jan 30, 2026):
Originally I was trying to just add the awscli tool as the default user, but what I was finding is that updates to
/etc/environmentwere not picked up at runtime no matter what.It appears the images assume the shell is a login one
github.com/catthehacker/docker_images@f9df13bfac/linux/ubuntu/Dockerfile (L22), while for many action steps it appears the default shell is overridden and executed with--noprofilegithub.com/nektos/act@d93106d194/pkg/model/workflow.go (L626). Which coupled with dockers behaviour means etc environment is not being picked up by the execute shells./etc/environment#1501