Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 gives "File not found: '/matt-usurp/validate-semver/v2.0.0/build/action.mjs'" #5

Closed
MaikVermeulen opened this issue Apr 8, 2024 · 6 comments · Fixed by #6 or #9
Closed
Assignees
Labels
bug Something isn't working

Comments

@MaikVermeulen
Copy link

MaikVermeulen commented Apr 8, 2024

First of all, thank you for making this Action! We've been using it in our pipeline for a while now 😄

With the upgrade to v2, we're getting this error:

image

Error: File not found: '/home/dev/github-runners/runner2/_work/_actions/matt-usurp/validate-semver/v2.0.0/build/action.mjs'
@matt-usurp
Copy link
Owner

matt-usurp commented Apr 8, 2024

I will take a look, this is weird. My guess is this will be a fairly simple fix.

Edit: Also thanks! I thought for the longest time this thing wasn't in use, you do not get any metrics as an actions owner.

@matt-usurp matt-usurp self-assigned this Apr 8, 2024
@matt-usurp matt-usurp added the bug Something isn't working label Apr 8, 2024
@matt-usurp matt-usurp changed the title v2 gives "File not found: '/home/dev/github-runners/runner2/_work/_actions/matt-usurp/validate-semver/v2.0.0/build/action.mjs'" v2 gives "File not found: '/matt-usurp/validate-semver/v2.0.0/build/action.mjs'" Apr 8, 2024
@matt-usurp
Copy link
Owner

I believe I have fixed this, pushed new tag v2.0.1 and changes are updated on the v2 branch

@MaikVermeulen
Copy link
Author

I believe I have fixed this, pushed new tag v2.0.1 and changes are updated on the v2 branch

Thank you @matt-usurp for the stellar response time!

The file is now being found, but it seems there is another error:

file:///_actions/matt-usurp/validate-semver/v2.0.1/build/action.mjs:12
  throw Error('Dynamic require of "' + x + '" is not supported');
        ^

Error: Dynamic require of "os" is not supported
    at file:///home/dev/github-runners/runner1/_work/_actions/matt-usurp/validate-semver/v2.0.1/build/action.mjs:12:9
    at node_modules/@actions/core/lib/command.js (file:///home/dev/github-runners/runner1/_work/_actions/matt-usurp/validate-semver/v2.0.1/build/action.mjs:108:27)
    at __require2 (file:///home/dev/github-runners/runner1/_work/_actions/matt-usurp/validate-semver/v2.0.1/build/action.mjs:18:[5](https://github.com/Quattio/cic-yocto-builder/actions/runs/8611010570/job/23597450361#step:8:6)0)
    at node_modules/@actions/core/lib/core.js (file:///home/dev/github-runners/runner1/_work/_actions/matt-usurp/validate-semver/v2.0.1/build/action.mjs:2040:21)
    at __require2 (file:///home/dev/github-runners/runner1/_work/_actions/matt-usurp/validate-semver/v2.0.1/build/action.mjs:18:50)
    at file:///home/dev/github-runners/runner1/_work/_actions/matt-usurp/validate-semver/v2.0.1/build/action.mjs:2[6](https://github.com/Quattio/cic-yocto-builder/actions/runs/8611010570/job/23597450361#step:8:7)81:2[7](https://github.com/Quattio/cic-yocto-builder/actions/runs/8611010570/job/23597450361#step:8:8)
    at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:66:12)

Node.js v20.[8](https://github.com/Quattio/cic-yocto-builder/actions/runs/8611010570/job/23597450361#step:8:9).1

@matt-usurp
Copy link
Owner

Okay, I might need to revert the esm upgrade and keep cjs on node@20
I will give it a go in an hour or so, sorry about this

@matt-usurp matt-usurp reopened this Apr 9, 2024
matt-usurp added a commit that referenced this issue Apr 9, 2024
The `@actions/core` package seems to break with the `esm` compilation
at the moment. See issue #5 for more information.
matt-usurp added a commit that referenced this issue Apr 9, 2024
* fix: build for `node@20` using `commonjs`

The `@actions/core` package seems to break with the `esm` compilation
at the moment. See issue #5 for more information.

* build: fix broken filenames in `tsconfig.json`

Fixes for configuration files in `tsconfig.json`

* build: compiled action bundle

Added new bundle with `cjs` syntax

* build: add test command to workflow

Adds a command that will run the compiled action to validate it has no
compilation time errors.
@matt-usurp
Copy link
Owner

Right, I hope this is fixed, I have run tests and it seems to work for me now.
Sorry about this, seems to be a problem with @actions/core not compiling for the newer syntaxes

@MaikVermeulen
Copy link
Author

Seems to be good now, thanks a ton @matt-usurp! We appreciate the quick resolution 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants