[GH-ISSUE #1847] Error: Cannot find module 'node:os' #896

Closed
opened 2026-03-01 21:47:14 +03:00 by kerem · 3 comments
Owner

Originally created by @UnderpantsGnome on GitHub (Jun 6, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1847

Bug report info

act version:            0.2.46
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 10
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
	$HOME/.docker/run/docker.sock
Config files:           
	/Users/mmoen/.actrc:
		-P ubuntu-latest=catthehacker/ubuntu:full-latest
		-P ubuntu-latest=catthehacker/ubuntu:full-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:full-18.04
Build info:
	Go version:            go1.20.4
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-ldflags:             -X main.version=0.2.46
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               arm64
		GOOS:                 darwin
Docker Engine:
	Engine version:        24.0.2
	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-pr
	OS CPU:                5
	OS memory:             7851 MB
	Security options:
		name=seccomp,profile=builtin
		name=cgroupns

Command used with act

act --container-architecture linux/amd64

Describe issue

I'm getting Error: Cannot find module 'node:os' with the Large image, I can get further along with the Medium, but then it fails later on in the workflow.

No response

Workflow content

name: "CI"

on:
  push:
    branches: ["main"]

  pull_request:
    branches: ["main"]

jobs:
  test:
    runs-on: ubuntu-latest

    services:
      mysql:
        image: mysql:5.7-debian
        ports:
          - "3306:3306"

    env:
      RAILS_ENV: test

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Install Ruby and gems
        uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true

      - name: Setup NodeJS
        run: nvm install

      - name: Setup Chrome Driver
        run: |
          CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` && wget -N https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/
          unzip ~/chromedriver_linux64.zip -d ~/
          rm -f ~/bin/chromedriver
          mv -f ~/chromedriver ~/bin/chromedriver

      - name: Set up database
        run: |
          cp config/travis.database.yml config/database.yml
          bundle exec rails db:create
          bundle exec rails db:schema:load

      - name: Run tests
        run: bundle exec rspec

Relevant log output

% act
[CI/test] 🚀  Start image=catthehacker/ubuntu:full-20.04
[CI/test]   🐳  docker pull image=catthehacker/ubuntu:full-20.04 platform=linux/amd64 username= forcePull=true
[CI/test]   🐳  docker create image=catthehacker/ubuntu:full-20.04 platform=linux/amd64 entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[CI/test]   🐳  docker run image=catthehacker/ubuntu:full-20.04 platform=linux/amd64 entrypoint=["tail" "-f" "/dev/null"] cmd=[]
[CI/test]   ☁  git clone 'https://github.com/ruby/setup-ruby' # ref=v1
[CI/test] ⭐ Run Main Checkout code
[CI/test]   🐳  docker cp src=~/repo/. dst=~/repo
[CI/test]   ✅  Success - Main Checkout code
[CI/test] ⭐ Run Main Install Ruby and gems
[CI/test]   🐳  docker cp src=~/.cache/act/ruby-setup-ruby@v1/ dst=/var/run/act/actions/ruby-setup-ruby@v1/
[CI/test]   🐳  docker exec cmd=[node /var/run/act/actions/ruby-setup-ruby@v1/dist/index.js] user= workdir=
| internal/modules/cjs/loader.js:892
|   throw err;
|   ^
|
| Error: Cannot find module 'node:os'
| Require stack:
| - /run/act/actions/ruby-setup-ruby@v1/dist/index.js
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:745:27)
|     at Module.require (internal/modules/cjs/loader.js:961:19)
|     at require (internal/modules/cjs/helpers.js:92:18)
|     at Module.3143 (/run/act/actions/ruby-setup-ruby@v1/dist/index.js:322:42)
|     at __nccwpck_require__ (/run/act/actions/ruby-setup-ruby@v1/dist/index.js:65136:43)
|     at /run/act/actions/ruby-setup-ruby@v1/dist/index.js:65194:16
|     at /run/act/actions/ruby-setup-ruby@v1/dist/index.js:65381:3
|     at Object.<anonymous> (/run/act/actions/ruby-setup-ruby@v1/dist/index.js:65384:12)
|     at Module._compile (internal/modules/cjs/loader.js:1072:14) {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: [ '/run/act/actions/ruby-setup-ruby@v1/dist/index.js' ]
| }
[CI/test]   ❌  Failure - Main Install Ruby and gems
[CI/test] exitcode '1': failure
[CI/test] 🏁  Job failed
Error: Job 'test' failed

Additional information

No response

Originally created by @UnderpantsGnome on GitHub (Jun 6, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1847 ### Bug report info ```plain text act version: 0.2.46 GOOS: darwin GOARCH: arm64 NumCPU: 10 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock $HOME/.docker/run/docker.sock Config files: /Users/mmoen/.actrc: -P ubuntu-latest=catthehacker/ubuntu:full-latest -P ubuntu-latest=catthehacker/ubuntu:full-20.04 -P ubuntu-18.04=catthehacker/ubuntu:full-18.04 Build info: Go version: go1.20.4 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.46 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: arm64 GOOS: darwin Docker Engine: Engine version: 24.0.2 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-pr OS CPU: 5 OS memory: 7851 MB Security options: name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh act --container-architecture linux/amd64 ``` ### Describe issue I'm getting `Error: Cannot find module 'node:os'` with the Large image, I can get further along with the Medium, but then it fails later on in the workflow. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: "CI" on: push: branches: ["main"] pull_request: branches: ["main"] jobs: test: runs-on: ubuntu-latest services: mysql: image: mysql:5.7-debian ports: - "3306:3306" env: RAILS_ENV: test steps: - name: Checkout code uses: actions/checkout@v3 - name: Install Ruby and gems uses: ruby/setup-ruby@v1 with: bundler-cache: true - name: Setup NodeJS run: nvm install - name: Setup Chrome Driver run: | CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` && wget -N https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/ unzip ~/chromedriver_linux64.zip -d ~/ rm -f ~/bin/chromedriver mv -f ~/chromedriver ~/bin/chromedriver - name: Set up database run: | cp config/travis.database.yml config/database.yml bundle exec rails db:create bundle exec rails db:schema:load - name: Run tests run: bundle exec rspec ``` ### Relevant log output ```sh % act [CI/test] 🚀 Start image=catthehacker/ubuntu:full-20.04 [CI/test] 🐳 docker pull image=catthehacker/ubuntu:full-20.04 platform=linux/amd64 username= forcePull=true [CI/test] 🐳 docker create image=catthehacker/ubuntu:full-20.04 platform=linux/amd64 entrypoint=["tail" "-f" "/dev/null"] cmd=[] [CI/test] 🐳 docker run image=catthehacker/ubuntu:full-20.04 platform=linux/amd64 entrypoint=["tail" "-f" "/dev/null"] cmd=[] [CI/test] ☁ git clone 'https://github.com/ruby/setup-ruby' # ref=v1 [CI/test] ⭐ Run Main Checkout code [CI/test] 🐳 docker cp src=~/repo/. dst=~/repo [CI/test] ✅ Success - Main Checkout code [CI/test] ⭐ Run Main Install Ruby and gems [CI/test] 🐳 docker cp src=~/.cache/act/ruby-setup-ruby@v1/ dst=/var/run/act/actions/ruby-setup-ruby@v1/ [CI/test] 🐳 docker exec cmd=[node /var/run/act/actions/ruby-setup-ruby@v1/dist/index.js] user= workdir= | internal/modules/cjs/loader.js:892 | throw err; | ^ | | Error: Cannot find module 'node:os' | Require stack: | - /run/act/actions/ruby-setup-ruby@v1/dist/index.js | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15) | at Function.Module._load (internal/modules/cjs/loader.js:745:27) | at Module.require (internal/modules/cjs/loader.js:961:19) | at require (internal/modules/cjs/helpers.js:92:18) | at Module.3143 (/run/act/actions/ruby-setup-ruby@v1/dist/index.js:322:42) | at __nccwpck_require__ (/run/act/actions/ruby-setup-ruby@v1/dist/index.js:65136:43) | at /run/act/actions/ruby-setup-ruby@v1/dist/index.js:65194:16 | at /run/act/actions/ruby-setup-ruby@v1/dist/index.js:65381:3 | at Object.<anonymous> (/run/act/actions/ruby-setup-ruby@v1/dist/index.js:65384:12) | at Module._compile (internal/modules/cjs/loader.js:1072:14) { | code: 'MODULE_NOT_FOUND', | requireStack: [ '/run/act/actions/ruby-setup-ruby@v1/dist/index.js' ] | } [CI/test] ❌ Failure - Main Install Ruby and gems [CI/test] exitcode '1': failure [CI/test] 🏁 Job failed Error: Job 'test' failed ``` ### Additional information _No response_
kerem 2026-03-01 21:47:14 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 4, 2023):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1837651983 --> @github-actions[bot] commented on GitHub (Dec 4, 2023): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@Sebah01a commented on GitHub (Jan 22, 2024):

Hey @UnderpantsGnome, did you found a solution to this issue? I have exactly the same one.

<!-- gh-comment-id:1902811473 --> @Sebah01a commented on GitHub (Jan 22, 2024): Hey @UnderpantsGnome, did you found a solution to this issue? I have exactly the same one.
Author
Owner

@UnderpantsGnome commented on GitHub (Jan 22, 2024):

@Sebah01a I did not find a solution, I gave up on using act for workflow testing.

<!-- gh-comment-id:1904240100 --> @UnderpantsGnome commented on GitHub (Jan 22, 2024): @Sebah01a I did not find a solution, I gave up on using act for workflow testing.
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#896
No description provided.