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

Am I missing something?
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/[email protected]
with:
cmd: install # will run `yarn install` command
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 withFAILURE: 1
DEBU[0131] exit withFAILURE: 1
Error: exit withFAILURE: 1
Please let me know if I should post this somewhere
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:
...
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
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
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/'
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/[email protected]/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/[email protected]/.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
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.
@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 ...
RUNNER_TEMP should be included automatically by act
@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.
@braceta - was in a hurry and missed a git add ๐คฆโโ๏ธ- should be fixed now!
@cplee awesome. Thanks :)
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.
@fejx didn't work for me.
@fejx didn't work for me.
You are right. To be honest, I haven't checked if it actually worked when I posted this.
Most helpful comment
RUNNER_TEMPshould be included automatically byact