[GH-ISSUE #1584] Unable to locate executable file: yarn #795

Closed
opened 2026-03-01 21:46:26 +03:00 by kerem · 8 comments
Owner

Originally created by @euan-cowie on GitHub (Jan 26, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1584

Bug report info

act version:            0.2.40
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 10
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
        /Users/euan-cowie/.docker/run/docker.sock
Config files:           
        /Users/euan-cowie/.actrc:
                -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
                -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.19.5
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.40
                CGO_ENABLED:          1
                CGO_CFLAGS:           
                CGO_CPPFLAGS:         
                CGO_CXXFLAGS:         
                CGO_LDFLAGS:          
                GOARCH:               arm64
                GOOS:                 darwin
Docker Engine:
        Engine version:        20.10.22
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:            
        OS arch:               aarch64
        OS kernel:             5.15.49-linuxkit
        OS CPU:                5
        OS memory:             15987 MB
        Security options:
                name=seccomp,profile=default
                name=cgroupns

Command used with act

act -W ./.github/workflows/test-cypress.yml -j cypress-run --container-architecture linux/amd64

Describe issue

I am just trying to build the project before running the cypress tests but I cannot get to that point locally using act as it fails to find yarn? I have tested it on the github action runners, where it works. I can't find any documentation to say this would be expected locally.

No response

Workflow content

name: Test Cypress

on:
  push:
    branches: [test-cypress]

jobs:
  cypress-run:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Cypress run
        uses: cypress-io/github-action@v5.0.5
        with:
          build: yarn run build
          start: yarn start

Relevant log output

[Staging Build/cypress-run]   💬  ::debug::Checking zstd --version
[Staging Build/cypress-run]   💬  ::debug::*** zstd command line interface 64-bits v1.4.8, by Yann Collet ***
[Staging Build/cypress-run]   💬  ::debug::getCacheEntry - Attempt 1 of 2 failed with error: Cache Service Url not found, unable to restore cache.
[Staging Build/cypress-run]   💬  ::debug::*** zstd command line interface 64-bits v1.4.8, by Yann Collet ***
[Staging Build/cypress-run]   💬  ::debug::getCacheEntry - Attempt 1 of 2 failed with error: Cache Service Url not found, unable to restore cache.
[Staging Build/cypress-run]   💬  ::debug::getCacheEntry - Attempt 2 of 2 failed with error: Cache Service Url not found, unable to restore cache.
[Staging Build/cypress-run]   💬  ::debug::getCacheEntry - Attempt 2 of 2 failed with error: Cache Service Url not found, unable to restore cache.
| Restoring NPM cache error: getCacheEntry failed: Cache Service Url not found, unable to restore cache.
| Restoring Cypress cache error: getCacheEntry failed: Cache Service Url not found, unable to restore cache.
[Staging Build/cypress-run]   ❗  ::error::Unable to locate executable file: yarn. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
[Staging Build/cypress-run]   ❌  Failure - Main Cypress run
[Staging Build/cypress-run] exitcode '1': failure

Additional information

It should be noted that the same error occurs regardless of doing either:

      - name: Cypress run
        uses: cypress-io/github-action@v5.0.5
        with:
          build: yarn run build
          start: yarn start

or

      - name: Cypress run
        uses: cypress-io/github-action@v5.0.5
        with:
          build: npm build
          start: npm start
Originally created by @euan-cowie on GitHub (Jan 26, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1584 ### Bug report info ```plain text act version: 0.2.40 GOOS: darwin GOARCH: arm64 NumCPU: 10 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock /Users/euan-cowie/.docker/run/docker.sock Config files: /Users/euan-cowie/.actrc: -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 Build info: Go version: go1.19.5 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.40 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: arm64 GOOS: darwin Docker Engine: Engine version: 20.10.22 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: aarch64 OS kernel: 5.15.49-linuxkit OS CPU: 5 OS memory: 15987 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act -W ./.github/workflows/test-cypress.yml -j cypress-run --container-architecture linux/amd64 ``` ### Describe issue I am just trying to build the project before running the cypress tests but I cannot get to that point locally using act as it fails to find yarn? I have tested it on the github action runners, where it works. I can't find any documentation to say this would be expected locally. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Test Cypress on: push: branches: [test-cypress] jobs: cypress-run: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Cypress run uses: cypress-io/github-action@v5.0.5 with: build: yarn run build start: yarn start ``` ### Relevant log output ```sh [Staging Build/cypress-run] 💬 ::debug::Checking zstd --version [Staging Build/cypress-run] 💬 ::debug::*** zstd command line interface 64-bits v1.4.8, by Yann Collet *** [Staging Build/cypress-run] 💬 ::debug::getCacheEntry - Attempt 1 of 2 failed with error: Cache Service Url not found, unable to restore cache. [Staging Build/cypress-run] 💬 ::debug::*** zstd command line interface 64-bits v1.4.8, by Yann Collet *** [Staging Build/cypress-run] 💬 ::debug::getCacheEntry - Attempt 1 of 2 failed with error: Cache Service Url not found, unable to restore cache. [Staging Build/cypress-run] 💬 ::debug::getCacheEntry - Attempt 2 of 2 failed with error: Cache Service Url not found, unable to restore cache. [Staging Build/cypress-run] 💬 ::debug::getCacheEntry - Attempt 2 of 2 failed with error: Cache Service Url not found, unable to restore cache. | Restoring NPM cache error: getCacheEntry failed: Cache Service Url not found, unable to restore cache. | Restoring Cypress cache error: getCacheEntry failed: Cache Service Url not found, unable to restore cache. [Staging Build/cypress-run] ❗ ::error::Unable to locate executable file: yarn. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. [Staging Build/cypress-run] ❌ Failure - Main Cypress run [Staging Build/cypress-run] exitcode '1': failure ``` ### Additional information It should be noted that the same error occurs regardless of doing either: ```yml - name: Cypress run uses: cypress-io/github-action@v5.0.5 with: build: yarn run build start: yarn start ``` or ```yml - name: Cypress run uses: cypress-io/github-action@v5.0.5 with: build: npm build start: npm start ```
kerem 2026-03-01 21:46:26 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@KnisterPeter commented on GitHub (Feb 6, 2023):

The containers you use come without yarn preinstalled:

-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04

Either use a container which you prepared for your run environment or use the actions/setup-node action to install yarn.

https://github.com/nektos/act#default-runners-are-intentionally-incomplete

<!-- gh-comment-id:1419108684 --> @KnisterPeter commented on GitHub (Feb 6, 2023): The containers you use come without `yarn` preinstalled: ``` -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 ``` Either use a container which you prepared for your run environment or use the `actions/setup-node` action to install yarn. https://github.com/nektos/act#default-runners-are-intentionally-incomplete
Author
Owner

@aprilmintacpineda commented on GitHub (Feb 27, 2023):

This happened to me when I chose medium the first time I ran act. I erased my ~/.actrc file and then I ran act again and chose large this time and it worked.

<!-- gh-comment-id:1445691122 --> @aprilmintacpineda commented on GitHub (Feb 27, 2023): This happened to me when I chose `medium` the first time I ran `act`. I erased my `~/.actrc` file and then I ran act again and chose `large` this time and it worked.
Author
Owner

@JackInTaiwan commented on GitHub (Jun 21, 2023):

This happened to me when I chose medium the first time I ran act. I erased my ~/.actrc file and then I ran act again and chose large this time and it worked.

@aprilmintacpineda This works for me as well! Thanks!

<!-- gh-comment-id:1599998563 --> @JackInTaiwan commented on GitHub (Jun 21, 2023): > This happened to me when I chose `medium` the first time I ran `act`. I erased my `~/.actrc` file and then I ran act again and chose `large` this time and it worked. @aprilmintacpineda This works for me as well! Thanks!
Author
Owner

@frimmy commented on GitHub (Jul 13, 2023):

thanks @aprilmintacpineda 🙏

<!-- gh-comment-id:1634686553 --> @frimmy commented on GitHub (Jul 13, 2023): thanks @aprilmintacpineda 🙏
Author
Owner

@lopotras commented on GitHub (Feb 28, 2024):

Hi,
Having the same issue as @aprilmintacpineda - I chose the medium option, but can't find the ~/.actrc file to reset it. I installed act via homebrew and reinstalling also did not work for me to reset this setting.

Anyone has any good solution for resetting that option?

<!-- gh-comment-id:1968725730 --> @lopotras commented on GitHub (Feb 28, 2024): Hi, Having the same issue as @aprilmintacpineda - I chose the medium option, but can't find the `~/.actrc` file to reset it. I installed `act` via `homebrew` and reinstalling also did not work for me to reset this setting. Anyone has any good solution for resetting that option?
Author
Owner

@tomdownes14 commented on GitHub (Mar 19, 2024):

Hi, Having the same issue as @aprilmintacpineda - I chose the medium option, but can't find the ~/.actrc file to reset it. I installed act via homebrew and reinstalling also did not work for me to reset this setting.

Anyone has any good solution for resetting that option?

@lopotras - The location of the config file will be shown in the output of act --bug-report. You may find the config file is at /Users/<username>/Library/Application Support/act/actrc

<!-- gh-comment-id:2006444779 --> @tomdownes14 commented on GitHub (Mar 19, 2024): > Hi, Having the same issue as @aprilmintacpineda - I chose the medium option, but can't find the `~/.actrc` file to reset it. I installed `act` via `homebrew` and reinstalling also did not work for me to reset this setting. > > Anyone has any good solution for resetting that option? @lopotras - The location of the config file will be shown in the output of `act --bug-report`. You may find the config file is at `/Users/<username>/Library/Application Support/act/actrc`
Author
Owner

@tjmoore commented on GitHub (Feb 21, 2025):

setup-node doesn't appear to install yarn for me despite specifying yarn as cache. Documentation says package manager specified must be pre-installed anyway.

Large image option is crazy just to get yarn installed. 75GB of disc space and a monster download that takes a long time.

Option that works for me is just install yarn before it's needed. setup-node seems to need yarn pre-installed which is where it fails for me, so I run this before setup-node. npm already exists prior to picking the specific node version you want (if you don't care, setup-node could probably be skipped anyway).

    - name: Pre-install yarn for local runners
      run: npm install -g yarn
<!-- gh-comment-id:2675254340 --> @tjmoore commented on GitHub (Feb 21, 2025): setup-node doesn't appear to install yarn for me despite specifying yarn as cache. Documentation says package manager specified must be pre-installed anyway. Large image option is crazy just to get yarn installed. 75GB of disc space and a monster download that takes a long time. Option that works for me is just install yarn before it's needed. setup-node seems to need yarn pre-installed which is where it fails for me, so I run this before setup-node. npm already exists prior to picking the specific node version you want (if you don't care, setup-node could probably be skipped anyway). ```yaml - name: Pre-install yarn for local runners run: npm install -g yarn ```
Author
Owner

@emshach commented on GitHub (Apr 17, 2025):

Either use a container which you prepared for your run environment or use the actions/setup-node action to install yarn.

https://github.com/nektos/act#default-runners-are-intentionally-incomplete

That seems to be here now https://nektosact.com/usage/runners.html#default-runners-are-intentionally-incomplete

<!-- gh-comment-id:2812896659 --> @emshach commented on GitHub (Apr 17, 2025): > > Either use a container which you prepared for your run environment or use the `actions/setup-node` action to install yarn. > > https://github.com/nektos/act#default-runners-are-intentionally-incomplete That seems to be here now https://nektosact.com/usage/runners.html#default-runners-are-intentionally-incomplete
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#795
No description provided.