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

1.8.0 CLI does not work for Node 20 #280

Open
dclayton-godaddy opened this issue Dec 8, 2023 · 3 comments
Open

1.8.0 CLI does not work for Node 20 #280

dclayton-godaddy opened this issue Dec 8, 2023 · 3 comments
Assignees

Comments

@dclayton-godaddy
Copy link

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
Copy link
Author

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

@mjperrone
Copy link

This is also happening to me.

@mjperrone
Copy link

@Jamie-BitFlight

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