Skip to content

1.8.0 CLI does not work for Node 20 #280

@dclayton-godaddy

Description

@dclayton-godaddy

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions