[GH-ISSUE #170] Add RUNNER_TEMP (was: Node 12.16 Not found) #114

Closed
opened 2026-03-01 21:40:16 +03:00 by kerem · 17 comments
Owner

Originally created by @purefan on GitHub (Mar 25, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/170

Hello and thank you for the project!

Im trying to test an action that among other things needs to install nodejs (and then yarn), for now Im taking it one step at a time, checking out the project seems to work fine but when installing node act exists with the error:

::debug::checking cache: /opt/hostedtoolcache/node/12.16.1/x64
::debug::not found

image

Am I missing something?

Originally created by @purefan on GitHub (Mar 25, 2020). Original GitHub issue: https://github.com/nektos/act/issues/170 Hello and thank you for the project! Im trying to test an action that among other things needs to install nodejs (and then yarn), for now Im taking it one step at a time, checking out the project seems to work fine but when installing node act exists with the error: > ::debug::checking cache: /opt/hostedtoolcache/node/12.16.1/x64 > ::debug::not found ![image](https://user-images.githubusercontent.com/315880/77541248-b181ff00-6ea4-11ea-8cd4-29306a54b24d.png) Am I missing something?
kerem 2026-03-01 21:40:16 +03:00
Author
Owner

@purefan commented on GitHub (Mar 25, 2020):

Tried changing the step to yarn and that worked, so I guess this is not a problem in act but in the actual step...
fyi, this works for me:

- uses: borales/actions-yarn@v2.0.0
        with:
          cmd: install # will run `yarn install` command
<!-- gh-comment-id:603842665 --> @purefan commented on GitHub (Mar 25, 2020): Tried changing the step to yarn and that worked, so I guess this is not a problem in `act` but in the actual step... fyi, this works for me: ``` - uses: borales/actions-yarn@v2.0.0 with: cmd: install # will run `yarn install` command ```
Author
Owner

@purefan commented on GitHub (Mar 26, 2020):

Sorry to re-open but Im no longer sure where the problem lies. The following workflow works in Github but not in act:

on: push
jobs:
  unittest:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js
      uses: actions/setup-node@v1
      with:
        node-version: '12.x'
    - name: Install dependencies
      run: yarn

With the error:

[CI/unittest] Extracting content from '/tmp/act578814318' to '/actions/'
[CI/unittest] Exec command '[node /actions/actions-setup-node@v1/dist/index.js]'
[CI/unittest] 💬 ::debug::isExplicit:
[CI/unittest] 💬 ::debug::explicit? false
[CI/unittest] 💬 ::debug::evaluating 0 versions
[CI/unittest] 💬 ::debug::match not found
[CI/unittest] 💬 ::debug::evaluating 381 versions
[CI/unittest] 💬 ::debug::matched: v12.16.1
[CI/unittest] 💬 ::debug::isExplicit: 12.16.1
[CI/unittest] 💬 ::debug::explicit? true
[CI/unittest] 💬 ::debug::checking cache: /opt/hostedtoolcache/node/12.16.1/x64
[CI/unittest] 💬 ::debug::not found
[CI/unittest] ::error::Expected RUNNER_TEMP to be defined
[CI/unittest] Failure - Use Node.js
DEBU[0131] exit with FAILURE: 1
DEBU[0131] exit with FAILURE: 1
Error: exit with FAILURE: 1

Please let me know if I should post this somewhere

<!-- gh-comment-id:604377605 --> @purefan commented on GitHub (Mar 26, 2020): Sorry to re-open but Im no longer sure where the problem lies. The following workflow works in Github but not in `act`: ``` on: push jobs: unittest: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Use Node.js uses: actions/setup-node@v1 with: node-version: '12.x' - name: Install dependencies run: yarn ``` With the error: > [CI/unittest] Extracting content from '/tmp/act578814318' to '/actions/' > [CI/unittest] Exec command '[node /actions/actions-setup-node@v1/dist/index.js]' > [CI/unittest] 💬 ::debug::isExplicit: > [CI/unittest] 💬 ::debug::explicit? false > [CI/unittest] 💬 ::debug::evaluating 0 versions > [CI/unittest] 💬 ::debug::match not found > [CI/unittest] 💬 ::debug::evaluating 381 versions > [CI/unittest] 💬 ::debug::matched: v12.16.1 > [CI/unittest] 💬 ::debug::isExplicit: 12.16.1 > [CI/unittest] 💬 ::debug::explicit? true > [CI/unittest] 💬 ::debug::checking cache: /opt/hostedtoolcache/node/12.16.1/x64 > [CI/unittest] 💬 ::debug::not found > [CI/unittest] ❗ ::error::Expected RUNNER_TEMP to be defined > [CI/unittest] ❌ Failure - Use Node.js > DEBU[0131] exit with `FAILURE`: 1 > DEBU[0131] exit with `FAILURE`: 1 > Error: exit with `FAILURE`: 1 Please let me know if I should post this somewhere
Author
Owner

@kaira commented on GitHub (Mar 27, 2020):

I suppose the issue is that act does not introduce RUNNER_TEMP env var. Which is required by setup-node actions. Meanwhile you can try container:

...
jobs:
  unittest:
    runs-on: ubuntu-18.04
    container:
      image: node:12:6.1
    steps:
...
<!-- gh-comment-id:604905446 --> @kaira commented on GitHub (Mar 27, 2020): I suppose the issue is that act does not introduce RUNNER_TEMP env var. Which is required by setup-node actions. Meanwhile you can try container: ``` ... jobs: unittest: runs-on: ubuntu-18.04 container: image: node:12:6.1 steps: ... ```
Author
Owner

@pseudo-su commented on GitHub (Apr 6, 2020):

I have a similar issue in a go project (workflow is here https://github.com/pseudo-su/golang-service-template/blob/master/.github/workflows/go.yml)

[Go/Build] 🚀  Start image=node:12.6-buster-slim
[Go/Build]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Go/Build]   🐳  docker cp src=/Users/jstableford/Development/Projects/OpenSource/golang-service-template/. dst=/github/workspace
[Go/Build] ⭐  Run Set up Go 1.14
[Go/Build]   ☁  git clone 'https://github.com/actions/setup-go' # ref=v2-beta
[Go/Build]   🐳  docker cp src=/Users/jstableford/.cache/act/actions-setup-go@v2-beta dst=/actions/
| Setup go stable version spec 1.14
[Go/Build]   💬  ::debug::isExplicit: 
[Go/Build]   💬  ::debug::explicit? false
[Go/Build]   💬  ::debug::evaluating 0 versions
[Go/Build]   💬  ::debug::match not found
| A version satisfying 1.14 not found locally, attempting to download ...
[Go/Build]   💬  ::debug::check 1.14.1 satisfies 1.14
[Go/Build]   💬  ::debug::===amd64 && ===linux
[Go/Build]   💬  ::debug::amd64===amd64 && darwin===linux
[Go/Build]   💬  ::debug::amd64===amd64 && darwin===linux
[Go/Build]   💬  ::debug::386===amd64 && freebsd===linux
[Go/Build]   💬  ::debug::amd64===amd64 && freebsd===linux
[Go/Build]   💬  ::debug::386===amd64 && linux===linux
[Go/Build]   💬  ::debug::amd64===amd64 && linux===linux
[Go/Build]   💬  ::debug::matched go1.14.1
[Go/Build]   💬  ::debug::match go1.14.1
| Downloading from https://storage.googleapis.com/golang/go1.14.1.linux-amd64.tar.gz
[Go/Build]   ❗  ::error::Failed to download version 1.14: AssertionError [ERR_ASSERTION]: Expected RUNNER_TEMP to be defined
[Go/Build]   ❌  Failure - Set up Go 1.14
Error: exit with `FAILURE`: 1

Using the following looks like it solves it locally but I don't want to commit this

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - name: Set up Go 1.14
      id: go
      uses: actions/setup-go@v2-beta
      env:
        RUNNER_TEMP: /tmp
      with:
        go-version: 1.14

seems like it'd be a good idea to have act set the RUNNER_TEMP environment variable

<!-- gh-comment-id:609577331 --> @pseudo-su commented on GitHub (Apr 6, 2020): I have a similar issue in a go project (workflow is here https://github.com/pseudo-su/golang-service-template/blob/master/.github/workflows/go.yml) ```sh [Go/Build] 🚀 Start image=node:12.6-buster-slim [Go/Build] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Go/Build] 🐳 docker cp src=/Users/jstableford/Development/Projects/OpenSource/golang-service-template/. dst=/github/workspace [Go/Build] ⭐ Run Set up Go 1.14 [Go/Build] ☁ git clone 'https://github.com/actions/setup-go' # ref=v2-beta [Go/Build] 🐳 docker cp src=/Users/jstableford/.cache/act/actions-setup-go@v2-beta dst=/actions/ | Setup go stable version spec 1.14 [Go/Build] 💬 ::debug::isExplicit: [Go/Build] 💬 ::debug::explicit? false [Go/Build] 💬 ::debug::evaluating 0 versions [Go/Build] 💬 ::debug::match not found | A version satisfying 1.14 not found locally, attempting to download ... [Go/Build] 💬 ::debug::check 1.14.1 satisfies 1.14 [Go/Build] 💬 ::debug::===amd64 && ===linux [Go/Build] 💬 ::debug::amd64===amd64 && darwin===linux [Go/Build] 💬 ::debug::amd64===amd64 && darwin===linux [Go/Build] 💬 ::debug::386===amd64 && freebsd===linux [Go/Build] 💬 ::debug::amd64===amd64 && freebsd===linux [Go/Build] 💬 ::debug::386===amd64 && linux===linux [Go/Build] 💬 ::debug::amd64===amd64 && linux===linux [Go/Build] 💬 ::debug::matched go1.14.1 [Go/Build] 💬 ::debug::match go1.14.1 | Downloading from https://storage.googleapis.com/golang/go1.14.1.linux-amd64.tar.gz [Go/Build] ❗ ::error::Failed to download version 1.14: AssertionError [ERR_ASSERTION]: Expected RUNNER_TEMP to be defined [Go/Build] ❌ Failure - Set up Go 1.14 Error: exit with `FAILURE`: 1 ``` Using the following looks like it solves it locally but I don't want to commit this ```yaml build: name: Build runs-on: ubuntu-latest steps: - name: Set up Go 1.14 id: go uses: actions/setup-go@v2-beta env: RUNNER_TEMP: /tmp with: go-version: 1.14 ``` seems like it'd be a good idea to have `act` set the RUNNER_TEMP environment variable
Author
Owner

@deltaguita commented on GitHub (Apr 10, 2020):

Hi , I have a similar issue with ruby

jobs:
  build-debug:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Apply Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: '2.6'
[Android build/build-debug] Extracting content from '/var/folders/bs/jb27y9sd29xfxylqt586dnd00000gn/T/act233785436' to '/actions/'
[Android build/build-debug] Exec command '[node /actions/actions-setup-ruby@v1/lib/setup-ruby.js]'
[Android build/build-debug]   💬  ##[debug]isExplicit: 
[Android build/build-debug]   💬  ##[debug]explicit? false
[Android build/build-debug]   💬  ##[debug]evaluating 0 versions
[Android build/build-debug]   💬  ##[debug]match not found
[Android build/build-debug]   ❗  ##[error]Version 2.6 not found
[Android build/build-debug]   ❌  Failure - Apply Ruby
<!-- gh-comment-id:611973189 --> @deltaguita commented on GitHub (Apr 10, 2020): Hi , I have a similar issue with ruby ``` jobs: build-debug: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Apply Ruby uses: actions/setup-ruby@v1 with: ruby-version: '2.6' ``` ``` [Android build/build-debug] Extracting content from '/var/folders/bs/jb27y9sd29xfxylqt586dnd00000gn/T/act233785436' to '/actions/' [Android build/build-debug] Exec command '[node /actions/actions-setup-ruby@v1/lib/setup-ruby.js]' [Android build/build-debug] 💬 ##[debug]isExplicit: [Android build/build-debug] 💬 ##[debug]explicit? false [Android build/build-debug] 💬 ##[debug]evaluating 0 versions [Android build/build-debug] 💬 ##[debug]match not found [Android build/build-debug] ❗ ##[error]Version 2.6 not found [Android build/build-debug] ❌ Failure - Apply Ruby ```
Author
Owner

@FezVrasta commented on GitHub (Apr 10, 2020):

Having the same issue with setup-node :-(

jobs:
  functional-chromium:
    name: Chromium Functional Tests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
      - uses: microsoft/playwright-github-action@v1
      - uses: bahmutov/npm-install@v1
      - run: node ./node_modules/playwright/install.js
      - run: npm run test:functional
        env:
          BROWSER: chromium
          CI: true
          RUNNER_TEMP: '/tmp/'
<!-- gh-comment-id:612006865 --> @FezVrasta commented on GitHub (Apr 10, 2020): Having the same issue with setup-node :-( ``` jobs: functional-chromium: name: Chromium Functional Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 - uses: microsoft/playwright-github-action@v1 - uses: bahmutov/npm-install@v1 - run: node ./node_modules/playwright/install.js - run: npm run test:functional env: BROWSER: chromium CI: true RUNNER_TEMP: '/tmp/' ```
Author
Owner

@cookiescrumbs commented on GitHub (Apr 16, 2020):

Same issue....

[ng libraries/build] 🚀  Start image=node:12.6-buster-slim
[ng libraries/build]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[ng libraries/build]   🐳  docker cp src=/Users/steven.cook@ef.com/class-web/. dst=/github/workspace
[ng libraries/build] ⭐  Run actions/checkout@v2
[ng libraries/build]   ✅  Success - actions/checkout@v2
[ng libraries/build] ⭐  Run Setup Node.js environment
[ng libraries/build]   ☁  git clone 'https://github.com/actions/setup-node' # ref=v1
[ng libraries/build]   🐳  docker cp src=/Users/steven.cook@ef.com/.cache/act/actions-setup-node@v1 dst=/actions/
[ng libraries/build]   💬  ::debug::isExplicit:
[ng libraries/build]   💬  ::debug::explicit? false
[ng libraries/build]   💬  ::debug::evaluating 0 versions
[ng libraries/build]   💬  ::debug::match not found
[ng libraries/build]   💬  ::debug::evaluating 386 versions
[ng libraries/build]   💬  ::debug::matched: v12.16.2
[ng libraries/build]   💬  ::debug::isExplicit: 12.16.2
[ng libraries/build]   💬  ::debug::explicit? true
[ng libraries/build]   💬  ::debug::checking cache: /opt/hostedtoolcache/node/12.16.2/x64
[ng libraries/build]   💬  ::debug::not found
[ng libraries/build]   ❗  ::error::Expected RUNNER_TEMP to be defined
[ng libraries/build]   ❌  Failure - Setup Node.js environment
<!-- gh-comment-id:614598691 --> @cookiescrumbs commented on GitHub (Apr 16, 2020): Same issue.... ``` [ng libraries/build] 🚀 Start image=node:12.6-buster-slim [ng libraries/build] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [ng libraries/build] 🐳 docker cp src=/Users/steven.cook@ef.com/class-web/. dst=/github/workspace [ng libraries/build] ⭐ Run actions/checkout@v2 [ng libraries/build] ✅ Success - actions/checkout@v2 [ng libraries/build] ⭐ Run Setup Node.js environment [ng libraries/build] ☁ git clone 'https://github.com/actions/setup-node' # ref=v1 [ng libraries/build] 🐳 docker cp src=/Users/steven.cook@ef.com/.cache/act/actions-setup-node@v1 dst=/actions/ [ng libraries/build] 💬 ::debug::isExplicit: [ng libraries/build] 💬 ::debug::explicit? false [ng libraries/build] 💬 ::debug::evaluating 0 versions [ng libraries/build] 💬 ::debug::match not found [ng libraries/build] 💬 ::debug::evaluating 386 versions [ng libraries/build] 💬 ::debug::matched: v12.16.2 [ng libraries/build] 💬 ::debug::isExplicit: 12.16.2 [ng libraries/build] 💬 ::debug::explicit? true [ng libraries/build] 💬 ::debug::checking cache: /opt/hostedtoolcache/node/12.16.2/x64 [ng libraries/build] 💬 ::debug::not found [ng libraries/build] ❗ ::error::Expected RUNNER_TEMP to be defined [ng libraries/build] ❌ Failure - Setup Node.js environment ```
Author
Owner

@mattbrictson commented on GitHub (Apr 16, 2020):

This fixed some of the problems for me:

$ docker pull nektos/act-environments-ubuntu:18.04
$ act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04

There is an explanation in the README.

<!-- gh-comment-id:614691501 --> @mattbrictson commented on GitHub (Apr 16, 2020): This fixed some of the problems for me: ``` $ docker pull nektos/act-environments-ubuntu:18.04 $ act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 ``` There is an [explanation in the README](https://github.com/nektos/act#runners).
Author
Owner

@cookiescrumbs commented on GitHub (Apr 16, 2020):

@mattbrictson Thanks for pointing that out. I'm glad someone reads the docs :)

I also had to add RUNNER_TEMP: /tmp like @pseudo-su

name: libraries

on: [push]

jobs:
    build:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v2
            - name: Setup Node.js environment
              uses: actions/setup-node@v1
              env:
                RUNNER_TEMP: /tmp
              with:
                node-version: 12.6
            - run: |
                npm ci
                npm run build:util
                npm run test:util 

And that worked ...

<!-- gh-comment-id:614908043 --> @cookiescrumbs commented on GitHub (Apr 16, 2020): @mattbrictson Thanks for pointing that out. I'm glad someone reads the docs :) I also had to add ` RUNNER_TEMP: /tmp` like @pseudo-su ``` name: libraries on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup Node.js environment uses: actions/setup-node@v1 env: RUNNER_TEMP: /tmp with: node-version: 12.6 - run: | npm ci npm run build:util npm run test:util ``` And that worked ...
Author
Owner

@cplee commented on GitHub (Apr 16, 2020):

RUNNER_TEMP should be included automatically by act

<!-- gh-comment-id:614939591 --> @cplee commented on GitHub (Apr 16, 2020): `RUNNER_TEMP` should be included automatically by `act`
Author
Owner

@braceta commented on GitHub (Apr 23, 2020):

@cplee just tried this and RUNNER_TEMP is still not passed onto actions/setup-node step. Seems to work if you add it to the run_context.go, but don't know if that's the right thing to do.

<!-- gh-comment-id:618265794 --> @braceta commented on GitHub (Apr 23, 2020): @cplee just tried this and RUNNER_TEMP is still not passed onto actions/setup-node step. Seems to work if you add it to the run_context.go, but don't know if that's the right thing to do.
Author
Owner

@cplee commented on GitHub (Apr 23, 2020):

@braceta - was in a hurry and missed a git add 🤦‍♂️- should be fixed now!

<!-- gh-comment-id:618458720 --> @cplee commented on GitHub (Apr 23, 2020): @braceta - was in a hurry and missed a `git add` 🤦‍♂️- should be fixed now!
Author
Owner

@braceta commented on GitHub (Apr 23, 2020):

@cplee awesome. Thanks :)

<!-- gh-comment-id:618492469 --> @braceta commented on GitHub (Apr 23, 2020): @cplee awesome. Thanks :)
Author
Owner

@fejx commented on GitHub (Apr 28, 2020):

Another workaround until the fix is released would be to utilize the .actrc file or the --env-file switch to set the environment variable externally. See the Configuration Section in the readme for details.

<!-- gh-comment-id:620662352 --> @fejx commented on GitHub (Apr 28, 2020): Another workaround until the fix is released would be to utilize the `.actrc` file or the `--env-file` switch to set the environment variable externally. See the [Configuration Section in the readme](https://github.com/nektos/act#configuration) for details.
Author
Owner

@braceta commented on GitHub (Apr 28, 2020):

@fejx didn't work for me.

<!-- gh-comment-id:620662997 --> @braceta commented on GitHub (Apr 28, 2020): @fejx didn't work for me.
Author
Owner

@fejx commented on GitHub (Apr 28, 2020):

@fejx didn't work for me.

You are right. To be honest, I haven't checked if it actually worked when I posted this.

<!-- gh-comment-id:620692266 --> @fejx commented on GitHub (Apr 28, 2020): > @fejx didn't work for me. You are right. To be honest, I haven't checked if it actually worked when I posted this.
Author
Owner

@zhujian7 commented on GitHub (Apr 3, 2024):

Add --container-options -e RUNNER_TEMP=/tmp into ~/.actrc works for me.

<!-- gh-comment-id:2033447792 --> @zhujian7 commented on GitHub (Apr 3, 2024): Add `--container-options -e RUNNER_TEMP=/tmp` into `~/.actrc` works for me.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#114
No description provided.