Skip to content
Latchkey

Gitea Actions "node: not found" in the runner image in CI

Gitea Actions runs JavaScript actions (like checkout) with a node binary inside the job container. If your label maps to an image without node, the runner cannot launch the action and reports node not found.

What this error means

A run fails at the first JavaScript action (often checkout) with "node: not found" or a missing node executable, because the container image for that label has no Node.js.

Gitea Actions
/var/run/act/workflow/1: line 1: node: not found
Error: failed to run JavaScript action: exec: "node": executable file not found in $PATH

Common causes

The label image has no Node.js

A bare image such as alpine or ubuntu has no node, so JavaScript actions cannot run inside it.

A slim custom image dropped node

A trimmed runner image removed Node.js to save space, breaking every action implemented in JavaScript.

How to fix it

Map the label to an image that includes node

  1. Register the label with a docker image that ships Node.js.
  2. Restart the runner so the new mapping applies.
  3. Re-run the job and confirm JavaScript actions start.
Terminal
act_runner register --no-interactive \
  --instance https://gitea.example.com --token <TOKEN> \
  --labels ubuntu-latest:docker://node:20-bookworm

Install node in a custom runner image

If you build your own image, add Node.js so JavaScript actions have a runtime.

Dockerfile
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y nodejs npm

How to prevent it

  • Map runner labels to images that include Node.js.
  • Keep node in any custom runner image you build.
  • Test a JavaScript action (checkout) after changing an image.

Frequently asked questions

What causes ""node: not found""?
A bare image such as alpine or ubuntu has no node, so JavaScript actions cannot run inside it.
How do I fix "node: not found"?
Map the label to an image that includes node

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card