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

Dynamic require of "os" is not supported #49

Open
faburem opened this issue Mar 15, 2024 · 2 comments
Open

Dynamic require of "os" is not supported #49

faburem opened this issue Mar 15, 2024 · 2 comments

Comments

@faburem
Copy link

faburem commented Mar 15, 2024

Issue:
Autotag version 1.1.4 does not create a new tag, but raises the following error when used as Github action:

Run butlerlogic/[email protected]
  with:
    strategy: package
    tag_message: 🐛 fix github actions build
    root: ./
    min_version: 0.0.1
  env:
    GITHUB_TOKEN: ***
file:///home/runner/work/_actions/butlerlogic/action-autotag/1.1.4/dist/main.js:1[2](https://github.com/kromitgmbh/titra/actions/runs/8294522044/job/22699699681#step:3:2)
  throw new Error('Dynamic require of "' + x + '" is not supported');
        ^

Error: Dynamic require of "os" is not supported
    at file:///home/runner/work/_actions/butlerlogic/action-autotag/1.1.4/dist/main.js:12:9
    at node_modules/@actions/core/lib/command.js (file:///home/runner/work/_actions/butlerlogic/action-autotag/1.1.4/dist/main.js:96:28)
    at __require2 (file:///home/runner/work/_actions/butlerlogic/action-autotag/1.1.4/dist/main.js:15:50)
    at node_modules/@actions/core/lib/core.js (file:///home/runner/work/_actions/butlerlogic/action-autotag/1.1.4/dist/main.js:18[3](https://github.com/kromitgmbh/titra/actions/runs/8294522044/job/22699699681#step:3:3)[4](https://github.com/kromitgmbh/titra/actions/runs/8294522044/job/22699699681#step:3:4)0:21)
    at __require2 (file:///home/runner/work/_actions/butlerlogic/action-autotag/1.1.4/dist/main.js:1[5](https://github.com/kromitgmbh/titra/actions/runs/8294522044/job/22699699681#step:3:5):50)
    at file:///home/runner/work/_actions/butlerlogic/action-autotag/1.1.4/dist/main.js:20944:21
    at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:31[6](https://github.com/kromitgmbh/titra/actions/runs/8294522044/job/22699699681#step:3:6):24)
    at async loadESM (node:internal/process/esm_loader:34:[7](https://github.com/kromitgmbh/titra/actions/runs/8294522044/job/22699699681#step:3:7))
    at async handleMainPromise (node:internal/modules/run_main:66:12)

Node.js v20.[8](https://github.com/kromitgmbh/titra/actions/runs/8294522044/job/22699699681#step:3:8).1
@Lachee
Copy link

Lachee commented Mar 16, 2024

Can confirm I have this issue too on 1.1.4. Using ubuntu-latest and actions/checkout@v4. Here is the run that has the error: https://github.com/Lachee/mylo-codeview/actions/runs/8306398717/job/22734421079

  tag:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: ButlerLogic/[email protected] 
      id: tagger
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
      with:
        strategy: regex
        root: public/manifest.json
        regex_pattern: > 
          "version":\s*"([0-9]+\.[0-9]+\.[0-9]+)"
        tag_prefix: "v"
    outputs:
      tag: ${{ steps.tagger.outputs.tagname }}

On the older 1.1.3 there is a Cannot find package '@actions/core' error instead.

Temporary Fix

The 1.1.2 tag works fine for my needs:

 - uses: ButlerLogic/[email protected] 
      id: tagger
      env:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
      with:
        # stuff

@gabrielgpavao
Copy link

I got the exact same error when using the version 1.1.4 on ubuntu-latest.
The 1.1.2 works fine though.

bruno-fs added a commit to quipucords/django-json-agg that referenced this issue Aug 14, 2024
bruno-fs added a commit to quipucords/django-json-agg that referenced this issue Aug 14, 2024
bruno-fs added a commit to quipucords/django-json-agg that referenced this issue Aug 14, 2024
bruno-fs added a commit to quipucords/django-json-agg that referenced this issue Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants