# Gitea actions: “Cannot find: node in PATH”

**URL:** <https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544>\
**Category:** Actions\
**Created:** [July 10, 2023, 7:39am UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544 "2023-07-10T07:39:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Monty](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@Monty](https://forum.gitea.com/u/Monty)\
**Post date:** [July 10, 2023, 7:39am UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544/1 "2023-07-10T07:39:02Z")

</div>

I’m failing to get actions/checkout@v3 to run on a windows host.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/7/77af0d5909791034e14e1b2f0b4f89b4d472ca4a.png)

The crazy thing is when I start the act runner with “ubuntu” as label and change the “runs-on: windows” in the workflow yml also to “runs-on: ubuntu” the checkout works fine. But then I run into issues in later actions steps.

I don’t know how to debug any further. Any ideas?

My workflow yml:

```auto
name: compile
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on: [push]
jobs:
  Explore-Gitea-Actions:
    runs-on: windows
    steps: 
      - name: Check out repository code   
        uses: actions/checkout@v3

```

Output oft he act\_runner

```auto
[compile/Explore-Gitea-Actions] [DEBUG] expression '${{ github.repository }}' rewritten to 'format('{0}', github.repository)'
[compile/Explore-Gitea-Actions] [DEBUG] evaluating expression 'format('{0}', github.repository)'
[compile/Explore-Gitea-Actions] [DEBUG] expression 'format('{0}', github.repository)' evaluated to '%!t(string=Bentec-Test/AFE-Semistack-Private)'
[compile/Explore-Gitea-Actions] [DEBUG] expression '${{ github.token }}' rewritten to 'format('{0}', github.token)'
[compile/Explore-Gitea-Actions] [DEBUG] evaluating expression 'format('{0}', github.token)'
[compile/Explore-Gitea-Actions] [DEBUG] expression 'format('{0}', github.token)' evaluated to '%!t(string=***)'
[compile/Explore-Gitea-Actions] [DEBUG] type=remote-action actionDir=C:\Users\Drone\.cache\act/actions-checkout@v3 actionPath= workdir=\C:\Users\Drone\.cache\act\Test\Test_repo actionCacheDir=C:\Users\Drone\.cache\act actionName=actions-checkout@v3 containerActionDir=C:/Users/Drone/.cache/act/bdafc7e2f02359b7/act/actions/actions-checkout@v3
[compile/Explore-Gitea-Actions] [DEBUG] Removing C:\Users\Drone\.cache\act/actions-checkout@v3/.gitignore before docker cp
[compile/Explore-Gitea-Actions] [DEBUG] C:/Users/Drone/.cache/act/bdafc7e2f02359b7/act/actions/actions-checkout@v3
[compile/Explore-Gitea-Actions] [DEBUG] Stripping prefix:C:\Users\Drone\.cache\act\actions-checkout@v3\ src:C:\Users\Drone\.cache\act/actions-checkout@v3/
[compile/Explore-Gitea-Actions] [DEBUG] executing remote job container: [node C:/Users/Drone/.cache/act/bdafc7e2f02359b7/act/actions/actions-checkout@v3/dist/index.js]
| Cannot find: node in PATH
[compile/Explore-Gitea-Actions] ❌ Failure - Main Check out repository code
[compile/Explore-Gitea-Actions] Cannot find: node in PATH

```

---

<div class="post-metadata">

**Author:** ![techknowlogick](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/techknowlogick/32/4706_2.png) [@techknowlogick](https://forum.gitea.com/u/techknowlogick)\
**Post date:** [July 11, 2023, 6:02am UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544/2 "2023-07-11T06:02:45Z")

</div>

Hi, for (most) Actions node is required to be installed. In the default container image that is used node is installed, but for host-mode (which you are using for running on windows) you’ll need to install node on your host.

---

<div class="post-metadata">

**Author:** ![RogerSik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/rogersik/32/3871_2.png) [@RogerSik](https://forum.gitea.com/u/RogerSik)\
**Post date:** [July 13, 2023, 4:12am UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544/3 "2023-07-13T04:12:36Z")

</div>

@techknowlogick same issue here with the docker image of gitea actions. I fixed it with  
`apk add --no-cache nodejs`

but shoulnd’t this be already included in the official docker image?

---

<div class="post-metadata">

**Author:** ![nouknouk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/nouknouk/32/3960_2.png) [@nouknouk](https://forum.gitea.com/u/nouknouk)\
**Post date:** [August 12, 2023, 2:07pm UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544/4 "2023-08-12T14:07:55Z")

</div>

> [@techknowlogick](#):
>
> In the default container image that is used node is installed

I eperience the same issue:  
I’m using a docker-compose deployment for both gitea & act runner ; docker-compose file is equivalent to to one of the example: [gitea/act\_runner/src/branch/main/examples/docker-compose](https://gitea.com/gitea/act_runner/src/branch/main/examples/docker-compose)

```auto
version: "3.4"

services:

  gitea:
    container_name: gitea
    restart: always
    image: gitea/gitea:latest
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - GITEA __server__ HTTP_PORT=80
      - GITEA __server__ DOMAIN=git.lan
      - GITEA __server__ SSH_DOMAIN=gitea.lan
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /data/gitea:/data:rw
    cap_add:
      - NET_ADMIN

  gitea_runner:
    container_name: gitea_runner
    image: gitea/act_runner
    restart: always
    depends_on:
      - gitea
    volumes:
      - /data/gitea_runner:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      GITEA_INSTANCE_URL: "http://gitea.lan"
      GITEA_RUNNER_REGISTRATION_TOKEN: "xxx"

```

My workflow file is also the same as found in gitea’s documentation:

```auto
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on: [push]

jobs:
  Explore-Gitea-Actions:
    runs-on: ubuntu-latest
    steps:
      - run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
      - run: echo " This job is now running on a ${{ runner.os }} server hosted by Gitea!"
      - run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
      - run: env
      - name: Check out repository code
        uses: actions/checkout@v3

```

Despite of that, I get the same error for step `actions/checkout@v3`:

```auto
OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown

```

Note: my host is based on an ARM64 architecture.

---

<div class="post-metadata">

**Author:** ![nouknouk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/nouknouk/32/3960_2.png) [@nouknouk](https://forum.gitea.com/u/nouknouk)\
**Post date:** [August 12, 2023, 2:08pm UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544/5 "2023-08-12T14:08:53Z")

</div>

Also in my case, trying to manually install nodejs in act\_runner image didn’t solved the issue

```auto
docker exec gitea_runner apk add --no-cache nodejs

```

---

<div class="post-metadata">

**Author:** ![nouknouk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/nouknouk/32/3960_2.png) [@nouknouk](https://forum.gitea.com/u/nouknouk)\
**Post date:** [August 12, 2023, 2:28pm UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544/6 "2023-08-12T14:28:40Z")

</div>

Ok, I found the root cause of the error: the labels defined in the config file `.runner` weren’t appropriate.

replacing with those provided in gitea doc did the thing: [Act Runner | Gitea Documentation](https://docs.gitea.com/usage/actions/act-runner#labels)

---

<div class="post-metadata">

**Author:** ![Dubhar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/dubhar/32/4633_2.png) [@Dubhar](https://forum.gitea.com/u/Dubhar)\
**Post date:** [April 22, 2024, 11:28am UTC](https://forum.gitea.com/t/gitea-actions-cannot-find-node-in-path/7544/7 "2024-04-22T11:28:41Z")

</div>

still seems to be a thing and replacing the labels in `.runner` file worked for me too!

however I wanna add that the linked doc still suggests _node-16_, while _node-20_ is the default since _act-runner 0.2.9_
