Open smashedr opened 3 months ago
I was so confused why something that worked just days ago, stopped working today, I did more digging. The only thing I could find that changed locally from before/after was an apt upgrade. This is the log from that upgrade if useful:
Start-Date: 2024-07-03 02:05:36
Commandline: apt upgrade openssh-server
Requested-By: shane (1000)
Install: linux-modules-5.15.0-113-generic:amd64 (5.15.0-113.123, automatic)
Install: linux-headers-5.15.0-113:amd64 (5.15.0-113.123, automatic)
Install: linux-modules-extra-5.15.0-113-generic:amd64 (5.15.0-113.123, automatic)
Install: linux-headers-5.15.0-113-generic:amd64 (5.15.0-113.123, automatic)
Install: linux-image-5.15.0-113-generic:amd64 (5.15.0-113.123, automatic)
Upgrade: tailscale:amd64 (1.68.1, 1.68.2)
Upgrade: libcups2:amd64 (2.4.1op1-1ubuntu4.8, 2.4.1op1-1ubuntu4.10)
Upgrade: containerd.io:amd64 (1.6.33-1, 1.7.18-1)
Upgrade: docker-compose-plugin:amd64 (2.27.1-1~ubuntu.22.04~jammy, 2.28.1-1~ubuntu.22.04~jammy)
Upgrade: docker-ce-cli:amd64 (5:26.1.4-1~ubuntu.22.04~jammy, 5:27.0.3-1~ubuntu.22.04~jammy)
Upgrade: openssh-client:amd64 (1:8.9p1-3ubuntu0.7, 1:8.9p1-3ubuntu0.10)
Upgrade: linux-headers-generic:amd64 (5.15.0.112.112, 5.15.0.113.113)
Upgrade: pgadmin4-web:amd64 (8.8, 8.9)
Upgrade: google-chrome-stable:amd64 (126.0.6478.114-1, 126.0.6478.126-1)
Upgrade: libcdio19:amd64 (2.1.0-3build1, 2.1.0-3ubuntu0.2)
Upgrade: openssh-server:amd64 (1:8.9p1-3ubuntu0.7, 1:8.9p1-3ubuntu0.10)
Upgrade: pgadmin4:amd64 (8.8, 8.9)
Upgrade: linux-generic:amd64 (5.15.0.112.112, 5.15.0.113.113)
Upgrade: wget:amd64 (1.21.2-2ubuntu1, 1.21.2-2ubuntu1.1)
Upgrade: docker-buildx-plugin:amd64 (0.14.1-1~ubuntu.22.04~jammy, 0.15.1-1~ubuntu.22.04~jammy)
Upgrade: libruby3.0:amd64 (3.0.2-7ubuntu2.6, 3.0.2-7ubuntu2.7)
Upgrade: docker-ce:amd64 (5:26.1.4-1~ubuntu.22.04~jammy, 5:27.0.3-1~ubuntu.22.04~jammy)
Upgrade: ubuntu-pro-client-l10n:amd64 (32.3~22.04, 32.3.1~22.04)
Upgrade: libssl3:amd64 (3.0.2-0ubuntu1.15, 3.0.2-0ubuntu1.16)
Upgrade: docker-ce-rootless-extras:amd64 (5:26.1.4-1~ubuntu.22.04~jammy, 5:27.0.3-1~ubuntu.22.04~jammy)
Upgrade: ruby3.0-dev:amd64 (3.0.2-7ubuntu2.6, 3.0.2-7ubuntu2.7)
Upgrade: ruby3.0-doc:amd64 (3.0.2-7ubuntu2.6, 3.0.2-7ubuntu2.7)
Upgrade: pgadmin4-desktop:amd64 (8.8, 8.9)
Upgrade: libssl-dev:amd64 (3.0.2-0ubuntu1.15, 3.0.2-0ubuntu1.16)
Upgrade: linux-image-generic:amd64 (5.15.0.112.112, 5.15.0.113.113)
Upgrade: ruby3.0:amd64 (3.0.2-7ubuntu2.6, 3.0.2-7ubuntu2.7)
Upgrade: openssh-sftp-server:amd64 (1:8.9p1-3ubuntu0.7, 1:8.9p1-3ubuntu0.10)
Upgrade: netplan.io:amd64 (0.106.1-7ubuntu0.22.04.2, 0.106.1-7ubuntu0.22.04.4)
Upgrade: gh:amd64 (2.51.0, 2.52.0)
Upgrade: ubuntu-advantage-tools:amd64 (32.3~22.04, 32.3.1~22.04)
Upgrade: libnetplan0:amd64 (0.106.1-7ubuntu0.22.04.2, 0.106.1-7ubuntu0.22.04.4)
Upgrade: pgadmin4-server:amd64 (8.8, 8.9)
Upgrade: openssl:amd64 (3.0.2-0ubuntu1.15, 3.0.2-0ubuntu1.16)
Upgrade: linux-libc-dev:amd64 (5.15.0-112.122, 5.15.0-113.123)
Upgrade: ubuntu-pro-client:amd64 (32.3~22.04, 32.3.1~22.04)
End-Date: 2024-07-03 02:07:53
I believe I am running into a similar issue. I can get all packages and build the project locally, however act
is running into a MODULE_NOT_FOUND
error with a module I can retrieve, have installed, and can use.
$ act --bug-report
act version: 0.2.65
GOOS: linux
GOARCH: amd64
NumCPU: 12
Docker host: DOCKER_HOST environment variable is not set
Sockets found:
/var/run/docker.sock
Config files:
/home/nathan/.config/act/actrc:
-P ubuntu-latest=catthehacker/ubuntu:act-latest
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
Go version: go1.21.12
Module path: github.com/nektos/act
Main version: (devel)
Main path: github.com/nektos/act
Main checksum:
Build settings:
-buildmode: exe
-compiler: gc
-ldflags: -s -w -X main.version=0.2.65 -X main.commit=bda491e406db6c85865498ced18764bc00491a5e -X main.date=2024-08-01T02:22:32Z -X main.builtBy=goreleaser
CGO_ENABLED: 0
GOARCH: amd64
GOOS: linux
GOAMD64: v1
vcs: git
vcs.revision: bda491e406db6c85865498ced18764bc00491a5e
vcs.time: 2024-08-01T02:22:10Z
vcs.modified: false
Docker Engine:
Engine version: 24.0.7
Engine runtime: runc
Cgroup version: 2
Cgroup driver: systemd
Storage driver: overlay2
Registry URI: https://index.docker.io/v1/
OS: Pop!_OS 22.04 LTS
OS type: linux
OS version: 22.04
OS arch: x86_64
OS kernel: 6.9.3-76060903-generic
OS CPU: 12
OS memory: 15702 MB
Security options:
name=apparmor
name=seccomp,profile=builtin
name=cgroupns
$ act
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock'
[main.yml/build] π Start image=catthehacker/ubuntu:act-latest
[main.yml/build] π³ docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[main.yml/build] using DockerAuthConfig authentication for docker pull
[main.yml/build] π³ docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[main.yml/build] π³ docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[main.yml/build] π³ docker exec cmd=[node --no-warnings -e console.log(process.execPath)] user= workdir=
[main.yml/build] β git clone 'https://github.com/actions/setup-node' # ref=v4
[main.yml/build] β Run Main Checkout
[main.yml/build] π³ docker cp src=/home/nathan/code/git/oesterle-antora/. dst=/home/nathan/code/git/oesterle-antora
[main.yml/build] β
Success - Main Checkout
[main.yml/build] β Run Main Node
[main.yml/build] π³ docker cp src=/home/nathan/.cache/act/actions-setup-node@v4/ dst=/var/run/act/actions/actions-setup-node@v4/
[main.yml/build] π³ docker exec cmd=[/opt/acttoolcache/node/18.20.4/x64/bin/node /var/run/act/actions/actions-setup-node@v4/dist/setup/index.js] user= workdir=
[main.yml/build] π¬ ::debug::isExplicit:
[main.yml/build] π¬ ::debug::explicit? false
[main.yml/build] π¬ ::debug::isExplicit: 20.17.0
[main.yml/build] π¬ ::debug::explicit? true
[main.yml/build] π¬ ::debug::evaluating 1 versions
[main.yml/build] π¬ ::debug::matched: 20.17.0
[main.yml/build] π¬ ::debug::checking cache: /opt/hostedtoolcache/node/20.17.0/x64
[main.yml/build] π¬ ::debug::Found tool in cache node 20.17.0 x64
| Found in cache @ /opt/hostedtoolcache/node/20.17.0/x64
[main.yml/build] β ::group::Environment details
| node: v20.17.0
| npm: 10.8.2
| yarn:
[main.yml/build] β ::endgroup::
[main.yml/build] β add-matcher /run/act/actions/actions-setup-node@v4/.github/tsc.json
[main.yml/build] β add-matcher /run/act/actions/actions-setup-node@v4/.github/eslint-stylish.json
[main.yml/build] β add-matcher /run/act/actions/actions-setup-node@v4/.github/eslint-compact.json
[main.yml/build] β
Success - Main Node
[main.yml/build] β ::set-output:: node-version=v20.17.0
[main.yml/build] β ::add-path:: /opt/hostedtoolcache/node/20.17.0/x64/bin
[main.yml/build] β Run Main Build
[main.yml/build] π³ docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
|
| up to date, audited 149 packages in 570ms
|
| 14 packages are looking for funding
| run `npm fund` for details
|
| found 0 vulnerabilities
| node:internal/modules/cjs/loader:641
| throw e;
| ^
|
| Error: Cannot find module '/home/nathan/code/git/oesterle-antora/node_modules/yargs-parser/build/index.cjs'
| at createEsmNotFoundErr (node:internal/modules/cjs/loader:1262:15)
| at finalizeEsmResolution (node:internal/modules/cjs/loader:1250:15)
| at resolveExports (node:internal/modules/cjs/loader:634:14)
| at Module._findPath (node:internal/modules/cjs/loader:724:31)
| at Module._resolveFilename (node:internal/modules/cjs/loader:1211:27)
| at Module._load (node:internal/modules/cjs/loader:1051:27)
| at Module.require (node:internal/modules/cjs/loader:1311:19)
| at require (node:internal/modules/helpers:179:18)
| at Object.<anonymous> (/home/nathan/code/git/oesterle-antora/node_modules/convict/src/main.js:9:19)
| at Module._compile (node:internal/modules/cjs/loader:1469:14) {
| code: 'MODULE_NOT_FOUND',
| path: '/home/nathan/code/git/oesterle-antora/node_modules/yargs-parser/package.json'
| }
|
| Node.js v20.17.0
[main.yml/build] β Failure - Main Build
[main.yml/build] exitcode '1': failure
[main.yml/build] π Job failed
Error: Job 'build' failed
$ npm ls yargs-parser
oesterle-antora@ /media/nathan/93ea1021-a910-42e9-a09d-34ac8c8e1a77/code/git/oesterle-antora
βββ¬ @antora/cli@3.1.9
βββ¬ @antora/playbook-builder@3.1.9
βββ¬ convict@6.2.4
βββ yargs-parser@20.2.9
{
"devDependencies": {
"@antora/cli": "3.1.9",
"@antora/site-generator": "3.1.9"
},
"dependencies": {
"asciidoctor-plantuml": "^1.5.0"
}
}
# This workflow will deploy the static website to the remote server.
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build
run: |
npm install
npx antora generate antora-playbook.yml --stacktrace
- name: Test rsync restriction
shell: bash
run: |
mkdir -p ~/.ssh/
echo "${{secrets.DEPLOY_SSH_KEY}}" > ~/.ssh/private.key
echo "Created Private Key File"
sudo chmod 600 ~/.ssh/private.key
echo "${{secrets.DEPLOY_KNOWN_HOST}}" > ~/.ssh/known_hosts
echo "Added known hosts"
CODE=1
ssh -q -i ~/.ssh/private.key ${{secrets.DEPLOY_USER}}@${{secrets.HOST}}
SUCCESS=$?
echo "Success: $SUCCESS"
if [[ $SUCCESS != 0 ]]; then
echo "Task failed successfully"
CODE=0
fi
echo $CODE
exit $CODE
- name: Deploy
uses: up9cloud/action-rsync@v1.4
env:
HOST: ${{secrets.HOST}}
USER: ${{secrets.DEPLOY_USER}}
KEY: ${{secrets.DEPLOY_SSH_KEY}}
TARGET: .
MODE: push
SOURCE: build/site/
@noesterle
Make sure you don't have your node_modules in your .gitignore or use --use-gitignore=false
I added more information about this here: https://github.com/smashedr/js-test-action
Using --use-gitignore=false
worked for me, thank you!
I didn't have node_modules in my .gitignore, the only thing that was in there was where the build output is put. If act
respecting the .gitignore meant that directory couldn't be created/seen, that must have triggered the same message.
Bug report info
Command used with act
Describe issue
All my local actions started throwing this error (based on the respective local action being used):
Error: Cannot find module '/home/shane/docker/test2/parse-issue-form-action/dist/index.js'
But the file is clearly there:
action.yml
This was previously working working just fine. I setup an all new test to make sure it was not something with my environment, but got the exact same error. This is the sample test I setup:
Note: Previously I place all my local actions in the
./.github
folder, example:.github/parse-issue-form-action
I have tried this new test in both the./.github
directory and current working directory, but both throw the same error.Additionally, I was also previously able to run my actions from source, by setting my main in action.yml to
src/index.js
with anode_modules
in the current working directory, but doing that also fails with the errorError: Cannot find module '@actions/core'
whennpm ls
clearly shows it installed.Again, all this was previously working, just days ago, and now all fails. Did something change?
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
The
index.js
has was reduced to just this for the test: