Skip to content

github-runner: can't run actions that contain hashFiles() function #566909

Closed

Description

@takeda

Nixpkgs version

  • Stable (26.05)

Describe the bug

It looks like latest runner fails whenever hashFiles() function is used (there might be other built in ones too). Apparently it needs node20 to run it, which was removed from NixOS due to being depreciated.

Looks like github-runner has bundled node20 with it, but that was removed during build.

This the error I see:

Error: The template is not valid. /run/github-runner/nixos-runner1/[owner]/[repo]/./.github/actions/devenv/action.yml (Line: 40, Col: 14): An error occurred trying to start process '/nix/store/dbayshmzyzmb2fp74fgpdbv5056dbdhb-github-runner-2.337.0/lib/externals/node20/bin/node' with working directory '/run/github-runner/nixos-runner1/[owner]/[repo]'. No such file or directory

There's more details here: actions/runner#4737

I tried to follow the (looks like copilot generated) advice given adding node20 back to get things working at least temporarily, but it of course doesn't work.

Failed tests:
out/Release/node --no-warnings /build/node-v20.20.2/test/parallel/test-crypto-authenticated.js
make: *** [Makefile:556: test-ci-js] Error 1
error: Cannot build '/nix/store/09g7iypz4ys9hax4d1ajnxh8rp1wnirj-nodejs-slim-20.20.2.drv'.
       Reason: builder failed with exit code 2.
       Output paths:
         /nix/store/0757l0sqivkk243pvr3ksh03m7h2kpja-nodejs-slim-20.20.2-npm
         /nix/store/7bfiafhi3pjf8d9f025hwvxigdhd1sp4-nodejs-slim-20.20.2-corepack
         /nix/store/hl1f7zcfjwy1xx70h6mnixjpwpsk7ii3-nodejs-slim-20.20.2-libv8
         /nix/store/wfymc28j0y02pca309907pyvf32p4w25-nodejs-slim-20.20.2-dev
         /nix/store/xblig6yxyralmvdncxi8cp86c63j4z4k-nodejs-slim-20.20.2
error: Cannot build '/nix/store/n2wgwnis7kb402jzv20a6k3xkwd75s9m-nodejs-20.20.2.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/iva0ni1kz2g8yg8sam7ggqd0adqzi6ln-nodejs-20.20.2
error: Cannot build '/nix/store/3hlwgx8lnk7f924xxm4yvh8cgj9mp29z-github-runner-2.337.0.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/vjvx1cvi19n73bzkg27j1h9nij13i7bw-github-runner-2.337.0
error: Cannot build '/nix/store/qjyxhgdf8113kjfasss4kkhqs9f9pbbq-unit-github-runner-nixos-runner1.service.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/h1hgvhd7gkdqzcpp44rlbdgfn0vrs4d2-unit-github-runner-nixos-runner1.service
error: Cannot build '/nix/store/nbm0s25743s7nnb8x90amkw8s2w9yg02-system-units.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/scjs90snsr4k91n25z43fwpw050gwy3x-system-units
error: Cannot build '/nix/store/c1csgxzyzs45l4srjgyfdh8ss18wnai9-etc.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/pqz3kyj5nqqaazsi53869k04nd5ydwk8-etc
error: Cannot build '/nix/store/imqz1p5fd4n3yv3yd6q5zg5g64nwxcqw-nixos-system-unnamed-26.05.10529.c508844df6c2.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/8j3h28yxp9x5fhhq777n7k0w3pdzsrlg-nixos-system-unnamed-26.05.10529.c508844df6c2
Command 'nix-build '<nixpkgs/nixos>' --attr config.system.build.toplevel --no-out-link' returned non-zero exit status 100.

Is there a quick workaround that could be applied?

I tried to use older version of nixpkgs but one from around end of July the github rejects and refuses to work saying it is too old.

Steps to reproduce

Start a workflow that contains hashFiles()

Expected behaviour

Have the workflow execute without errors.

Screenshots

No response

Relevant log output

Error: The template is not valid. /run/github-runner/nixos-runner1/[owner]/[repo]/./.github/actions/devenv/action.yml (Line: 40, Col: 14): An error occurred trying to start process '/nix/store/dbayshmzyzmb2fp74fgpdbv5056dbdhb-github-runner-2.337.0/lib/externals/node20/bin/node' with working directory '/run/github-runner/nixos-runner1/[owner]/[repo]'. No such file or directory

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.18.39, NixOS, 26.05 (Yarara), 26.05.10529.c508844df6c2
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.34.8
  • channels(root): "nixos-26.05"
  • nixpkgs: /nix/store/z2x0pki1q574vw0p3mx0nfvsychpnm0g-nixos-26.05/nixos

Notify maintainers

@veehaitch @kfollesdal @aanderse @zimbatm @osnyx


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: bug
    on Sep 25, 2026
  2. SuperSandro2000 commented on Sep 26, 2026

    @SuperSandro2000
    Member

    Does an update maybe fix that?

  3. takeda commented on Sep 26, 2026

    @takeda
    ContributorAuthor

    @SuperSandro2000 no, I used the latest version on nixos-26.05 channel and this is still happening.

    The actions/runner#4737 issue also confirms that runner still requires nodejs 20.

    It looks like the (likely LLM generated) change removed symlink without author questioning why it was there and if it is still needed.

    Now GitHub's policy to depreciate old releases (the reason that made me (and probably others) to perform upgrade) ensured that there's no working version currently so i can't even roll back.

  4. SuperSandro2000 commented on Sep 26, 2026

    @SuperSandro2000
    Member

    #541445 is not on 26.05 and was not backported, so the workaround described in the issue should there still work.

    #524856 disabled nodejs 20 already in May.

    It looks like the (likely LLM generated) change removed symlink without author questioning why it was there and if it is still needed.

    I think the alternative would have been to mark the package broken if it really does not work at all without nodejs 20.


    This likely requires a fix upstream. Nodejs 20 is not coming back at this point.

  5. takeda commented on Sep 26, 2026

    @takeda
    ContributorAuthor

    Regarding marking the package broken, this issue is subtle, because the runner works, it will only fail if you use one of built-in functions that still require node20. I'm currently aware of hashFiles() as that's what's throwing this error, but there probably others.

    So if somebody is never using those functions things might continue to work.

    Is there some kind of workaround I could use? I tried to unblock node20, but it failed to build.

  6. SuperSandro2000 commented on Sep 27, 2026

    @SuperSandro2000
    Member

    GitHub musst yesterday announced the deprecation of nodeja 20 in actions, so it should go away completely soon.

    You could take nodejs 20 from the stable before with outdated dependencies.

  7. takeda commented on Sep 27, 2026

    @takeda
    ContributorAuthor

    @SuperSandro2000 no in that ticket github staff (actions/runner#4737 (comment)) specified that this is related to ability for the user to use node20. Github runner still internally requires node20, and that dependency is yet to be removed.

  8. takeda commented on Sep 29, 2026

    @takeda
    ContributorAuthor

    For anyone who might experienced this issue, this is workaround that works for me:

    On shell type:

    nix-channel --add https://channels.nixos.org/nixos-25.11 nixos-2511
    nix-channel --update

    in /etc/nixos/configuration.nix add:

      nixpkgs = {
        config.packageOverrides = pkgs: {
          nixos-2511 = import <nixos-2511> { config = config.nixpkgs.config; };
        };
        overlays = [
          (final: prev: {
            github-runner = prev.github-runner.overrideAttrs (finalAttrs: previousAttrs: {
              preCheck = previousAttrs.preCheck + ''
                ln -s ${final.nixos-2511.nodejs_20} _layout/externals/node20
              '';
              postInstall = previousAttrs.postInstall + ''
                ln -s ${final.nixos-2511.nodejs_20} $out/lib/externals/node20
              '';
            });
          })
        ];
      };

    Edit: a simpler version based on the github runner fix. Instead of using older nixpkgs with working nodejs 20 we just link nodejs 24 as nodejs 20:

    in /etc/nixos/configuration.nix add:

      nixpkgs = {
        overlays = [
          (final: prev: {
            github-runner = prev.github-runner.overrideAttrs (finalAttrs: previousAttrs: {
              preCheck = previousAttrs.preCheck + ''
                ln -s ${final.nodejs_24} _layout/externals/node20
              '';
              postInstall = previousAttrs.postInstall + ''
                ln -s ${final.nodejs_24} $out/lib/externals/node20
              '';
            });
          })
        ];
      };
  9. salmanmkc commented on Oct 2, 2026

    @salmanmkc

    We will be releasing a new version of runner next week with node 24 on the internals, so this should hopefully work without any workarounds on the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions