bitflight-devops / github-action-readme-generator

📓 Generates a `README.md` from the GitHub Action's `action.yml`
Apache License 2.0
24 stars 15 forks source link

1.8.0 CLI does not work for Node 20 #280

Open dclayton-godaddy opened 11 months ago

dclayton-godaddy commented 11 months ago

Current behavior

npx --yes github-action-readme-generator@latest fails with the following error when running Node 20.10.0

$ npx --yes github-action-readme-generator@latest
{REDACTED}/elastic-apm-annotation/node_modules/.bin/github-action-readme-generator: line 2: syntax error near unexpected token `async'
{REDACTED}/elastic-apm-annotation/node_modules/.bin/github-action-readme-generator: line 2: `await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();

Expected behavior

Should generate docs without errors when using the CLI.

github-action-readme-generator version

1.8.0

CI environment

none

github-action-readme-generator configuration i.e: .ghadocs.json

{ "paths": { "action": "action.yml", "readme": "README.md" }, "show_logo": true, "versioning": { "enabled": true, "override": "", "prefix": "v", "branch": "main" }, "owner": "gdcorp-actions", "repo": "elastic-apm-annotation", "title_prefix": "GitHub Action: ", "pretty": true }

CI logs

Using CLI, not action.

dclayton-godaddy commented 11 months ago

As a side note, I also tested this in a docker container using node:20

mjperrone commented 10 months ago

This is also happening to me.

mjperrone commented 10 months ago

@Jamie-BitFlight