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

Fix problem with GitHub Action for welcome message #1750

Closed
namurphy opened this issue Oct 4, 2022 · 2 comments
Closed

Fix problem with GitHub Action for welcome message #1750

namurphy opened this issue Oct 4, 2022 · 2 comments
Assignees
Labels
GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) upstream fix required Issues & PRs that are blocked due to a problem with a dependency

Comments

@namurphy
Copy link
Member

namurphy commented Oct 4, 2022

In some recent runs of the welcome message GitHub Action, we've been getting an error that we'll need to fix. The error was...

/usr/bin/docker run --name e3916062a188734afea86784690f606b82_d2d698 --label 5364e3 --workdir /github/workspace --rm -e "INPUT_REPO-TOKEN" -e "INPUT_PR-MESSAGE" -e "INPUT_ISSUE-MESSAGE" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/PlasmaPy/PlasmaPy":"/github/workspace" 5364e3:916062a188734afea86784690f606b82
internal/modules/cjs/loader.js:1216
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /node_modules/@octokit/graphql/index.js
require() of ES modules is not supported.
require() of /node_modules/@octokit/graphql/index.js from /node_modules/@actions/github/lib/github.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /node_modules/@octokit/graphql/package.json.

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1216:13)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/node_modules/@actions/github/lib/github.js:14:19)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14) {
  code: 'ERR_REQUIRE_ESM'
}
@namurphy namurphy added the GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) label Oct 4, 2022
@namurphy namurphy self-assigned this Oct 4, 2022
@namurphy namurphy added the upstream fix required Issues & PRs that are blocked due to a problem with a dependency label Oct 5, 2022
@namurphy
Copy link
Member Author

namurphy commented Oct 5, 2022

Looks like this is a known issue that they're working on a fix for. When it gets fixed, we'll need to update the version of the GitHub Action...hopefully within the next few days.

@namurphy namurphy added the status: on hold Issues & PRs that are being intentionally delayed label Oct 5, 2022
@namurphy
Copy link
Member Author

namurphy commented Oct 6, 2022

Fixed by actions/first-interaction#101

@namurphy namurphy closed this as completed Oct 6, 2022
@namurphy namurphy removed the status: on hold Issues & PRs that are being intentionally delayed label May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Actions A continuous integration platform for automating tests and other tasks (see .github/ directory) upstream fix required Issues & PRs that are blocked due to a problem with a dependency
Projects
None yet
Development

No branches or pull requests

1 participant