[GH-ISSUE #220] Can't use setup-chromedriver Action because module not found #153

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

Originally created by @toadle on GitHub (May 3, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/220

Hey guys,

I wonder if this is a problem where I don't understand act or if it still has an issue.

My problem is that I try to run a workflow locally that runs just fine on Github.

Here is my workflow:

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: Ruby

on:
  push:
    branches: [master, dev]
  pull_request:
    branches: [master, dev]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: setup-chromedriver
        uses: nanasess/setup-chromedriver@v1.0.1
      - name: Set up Ruby
        # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
        # change this to (see https://github.com/ruby/setup-ruby#versioning):
        # uses: ruby/setup-ruby@v1
        uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
        with:
          ruby-version: 2.6
      - name: Install System Dependencies
        run: sudo apt-get install libsqlite3-dev
      - name: Install Ruby Bundles
        run: bundle install
      - name: Run tests
        run: bundle exec rspec --format progress --format RspecJunitFormatter --out tmp/test-results/rspec.xml

It basically just runs my tests and there it needs Chromedriver which I use from nanasess/setup-chromedriver@v1.0.1.

Now it runs just fine on Github but with act it gives me:

[Ruby/test] 🚀  Start image=node:12.6-buster-slim
[Ruby/test]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Ruby/test]   🐳  docker cp src=/Users/tim/Workspace/hopla/. dst=/github/workspace
[Ruby/test] ⭐  Run actions/checkout@v2
[Ruby/test]   ✅  Success - actions/checkout@v2
[Ruby/test] ⭐  Run setup-chromedriver
[Ruby/test]   ☁  git clone 'https://github.com/nanasess/setup-chromedriver' # ref=v1.0.1
[Ruby/test]   🐳  docker cp src=/Users/tim/.cache/act/nanasess-setup-chromedriver@v1.0.1 dst=/actions/
| internal/modules/cjs/loader.js:628
|     throw err;
|     ^
| 
| Error: Cannot find module '@actions/core'
| Require stack:
| - /actions/nanasess-setup-chromedriver@v1.0.1/lib/setup-chromedriver.js
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:527:27)
|     at Module.require (internal/modules/cjs/loader.js:683:19)
|     at require (internal/modules/cjs/helpers.js:16:16)
|     at Object.<anonymous> (/actions/nanasess-setup-chromedriver@v1.0.1/lib/setup-chromedriver.js:19:27)
|     at Module._compile (internal/modules/cjs/loader.js:776:30)
|     at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
|     at Module.load (internal/modules/cjs/loader.js:643:32)
|     at Function.Module._load (internal/modules/cjs/loader.js:556:12)
|     at Function.Module.runMain (internal/modules/cjs/loader.js:839:10) {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: [
|     '/actions/nanasess-setup-chromedriver@v1.0.1/lib/setup-chromedriver.js'
|   ]
| }
[Ruby/test]   ❌  Failure - setup-chromedriver
Error: exit with `FAILURE`: 1

Seems to be a simple require inside setup-chromedriver where I don't get why it fails?!

Originally created by @toadle on GitHub (May 3, 2020). Original GitHub issue: https://github.com/nektos/act/issues/220 Hey guys, I wonder if this is a problem where I don't understand `act` or if it still has an issue. My problem is that I try to run a workflow locally that runs just fine on Github. Here is my workflow: ``` # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby name: Ruby on: push: branches: [master, dev] pull_request: branches: [master, dev] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: setup-chromedriver uses: nanasess/setup-chromedriver@v1.0.1 - name: Set up Ruby # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): # uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 with: ruby-version: 2.6 - name: Install System Dependencies run: sudo apt-get install libsqlite3-dev - name: Install Ruby Bundles run: bundle install - name: Run tests run: bundle exec rspec --format progress --format RspecJunitFormatter --out tmp/test-results/rspec.xml ``` It basically just runs my tests and there it needs Chromedriver which I use from `nanasess/setup-chromedriver@v1.0.1`. Now it runs just fine on Github but with `act` it gives me: ``` [Ruby/test] 🚀 Start image=node:12.6-buster-slim [Ruby/test] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Ruby/test] 🐳 docker cp src=/Users/tim/Workspace/hopla/. dst=/github/workspace [Ruby/test] ⭐ Run actions/checkout@v2 [Ruby/test] ✅ Success - actions/checkout@v2 [Ruby/test] ⭐ Run setup-chromedriver [Ruby/test] ☁ git clone 'https://github.com/nanasess/setup-chromedriver' # ref=v1.0.1 [Ruby/test] 🐳 docker cp src=/Users/tim/.cache/act/nanasess-setup-chromedriver@v1.0.1 dst=/actions/ | internal/modules/cjs/loader.js:628 | throw err; | ^ | | Error: Cannot find module '@actions/core' | Require stack: | - /actions/nanasess-setup-chromedriver@v1.0.1/lib/setup-chromedriver.js | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:625:15) | at Function.Module._load (internal/modules/cjs/loader.js:527:27) | at Module.require (internal/modules/cjs/loader.js:683:19) | at require (internal/modules/cjs/helpers.js:16:16) | at Object.<anonymous> (/actions/nanasess-setup-chromedriver@v1.0.1/lib/setup-chromedriver.js:19:27) | at Module._compile (internal/modules/cjs/loader.js:776:30) | at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) | at Module.load (internal/modules/cjs/loader.js:643:32) | at Function.Module._load (internal/modules/cjs/loader.js:556:12) | at Function.Module.runMain (internal/modules/cjs/loader.js:839:10) { | code: 'MODULE_NOT_FOUND', | requireStack: [ | '/actions/nanasess-setup-chromedriver@v1.0.1/lib/setup-chromedriver.js' | ] | } [Ruby/test] ❌ Failure - setup-chromedriver Error: exit with `FAILURE`: 1 ``` Seems to be a simple `require` inside `setup-chromedriver` where I don't get why it fails?!
kerem 2026-03-01 21:40:41 +03:00
Author
Owner

@wagenet commented on GitHub (May 4, 2020):

I'm seeing something similar:

[Skylight Rust Agent/Test]   ☁  git clone 'https://github.com/actions/cache' # ref=v1
[Skylight Rust Agent/Test]   🐳  docker cp src=/Users/peterwagenet/.cache/act/actions-cache@v1 dst=/actions/
| internal/modules/cjs/loader.js:960
|   throw err;
|   ^
|
| Error: Cannot find module '/actions/actions-cache@v1/dist/restore/index.js'
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:840:27)
|     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
|     at internal/main/run_main_module.js:18:47 {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: []
| }
<!-- gh-comment-id:623747061 --> @wagenet commented on GitHub (May 4, 2020): I'm seeing something similar: ``` [Skylight Rust Agent/Test] ☁ git clone 'https://github.com/actions/cache' # ref=v1 [Skylight Rust Agent/Test] 🐳 docker cp src=/Users/peterwagenet/.cache/act/actions-cache@v1 dst=/actions/ | internal/modules/cjs/loader.js:960 | throw err; | ^ | | Error: Cannot find module '/actions/actions-cache@v1/dist/restore/index.js' | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15) | at Function.Module._load (internal/modules/cjs/loader.js:840:27) | at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) | at internal/main/run_main_module.js:18:47 { | code: 'MODULE_NOT_FOUND', | requireStack: [] | } ```
Author
Owner

@freeatnet commented on GitHub (May 5, 2020):

@wagenet The Cannot find module '/actions/actions-cache@v1/dist/restore/index.js' error is probably related to #193 given that they gitignore their dist/ directory.

<!-- gh-comment-id:624225840 --> @freeatnet commented on GitHub (May 5, 2020): @wagenet The `Cannot find module '/actions/actions-cache@v1/dist/restore/index.js'` error is probably related to #193 given that they gitignore their [`dist/` directory](https://github.com/actions/cache/blob/v1/.gitignore).
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#153
No description provided.