Open
Description
I'm trying to use this in our Organization and running into a problem. I've configured everything properly. A user has submitted an Issue requesting a license, and the workflow gives the following error. Any idea what I can do here to resolve this?
with:
script: const { Octokit } = require("@octokit/action");
const octokit = new Octokit();
await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Failed assigning the GitHub Copilot license. Please contact the organization administrator.',
content: 'confused',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
});
github-token: ***
debug: false
user-agent: actions/github-script
result-encoding: json
retries: 0
retry-exempt-status-codes: 400,401,403,404,422
env:
GITHUB_TOKEN: ***
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/my_repo/my_repo/node_modules/@octokit/action/dist-bundle/index.js from /home/runner/work/_actions/actions/github-script/v7/dist/index.js not supported.
Instead change the require of /home/runner/work/my_repo/my_repo/node_modules/@octokit/action/dist-bundle/index.js in /home/runner/work/_actions/actions/github-script/v7/dist/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.apply (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35477:23)
at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:3:21)
at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35425:12)
at main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:26)
at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35497:1 {
code: 'ERR_REQUIRE_ESM'
}
Error: Unhandled error: Error [ERR_REQUIRE_ESM]: require() of ES Module /home/runner/work/my_repo/my_repo/node_modules/@octokit/action/dist-bundle/index.js from /home/runner/work/_actions/actions/github-script/v7/dist/index.js not supported.
Instead change the require of /home/runner/work/my_repo/my_repo/node_modules/@octokit/action/dist-bundle/index.js in /home/runner/work/_actions/actions/github-script/v7/dist/index.js to a dynamic import() which is available in all CommonJS modules.
Metadata
Metadata
Assignees
Labels
No labels