first-interaction: Import error when using the action in a workflow
Hey! Our team has been enjoying this action for a long time now, but today we started getting this error:
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](https://github.com/creditornot/ops-tools/actions/runs/3150609247/jobs/5123593663#step:3:31))
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:[32](https://github.com/creditornot/ops-tools/actions/runs/3150609247/jobs/5123593663#step:3:33))
at Function.Module._load (internal/modules/cjs/loader.js:9[37](https://github.com/creditornot/ops-tools/actions/runs/3150609247/jobs/5123593663#step:3:38):14) {
code: 'ERR_REQUIRE_ESM'
}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 41
- Comments: 15 (2 by maintainers)
Commits related to this issue
- Fix greetings being broken Based on workaround from this issue: https://github.com/actions/first-interaction/issues/101 — committed to SkyCryptWebsite/SkyCrypt by MartinNemi03 2 years ago
- Update greetings.yml Workaround for https://github.com/actions/first-interaction/issues/101 — committed to vaadin/docs by jouni 2 years ago
- ci(issues): disable workflow step Comments out the `first-interaction` step due to a known issue that has been seen in `actions/first-interaction#v1`. https://github.com/actions/first-interaction/... — committed to vmware/power-validated-solutions-for-cloud-foundation by tenthirtyam 2 years ago
- ci(issues): disable workflow step Comments out the `first-interaction` step due to a known issue that has been seen in `actions/first-interaction#v1`. https://github.com/actions/first-interaction/is... — committed to vmware/power-validated-solutions-for-cloud-foundation by tenthirtyam 2 years ago
- MNT: Temporary workaround for https://github.com/actions/first-interaction/issues/101 This should be reverted when upstream is fixed. [ci skip] — committed to astropy/astropy by pllim 2 years ago
- ci(issues): disable workflow step (#119) Comments out the `first-interaction` step due to a known issue that has been seen in `actions/first-interaction#v1`. https://github.com/actions/first-inter... — committed to vmware/power-validated-solutions-for-cloud-foundation by tenthirtyam 2 years ago
- ci: temp fix the greetings action temp fixing the greetings action based on the suggestion provided here - https://github.com/actions/first-interaction/issues/101#issuecomment-1262487501 — committed to keploy/keploy by slayerjain 2 years ago
- Merge pull request #140 from osscameroon/revert-137-fix-greetins-issue fix: solve the first-interaction issue https://github.com/actions/first-interaction/issues/101 by adding the condition "continu... — committed to osscameroon/js-generator by FanJups 2 years ago
- ci: temp fix the greetings action (#182) temp fixing the greetings action based on the suggestion provided here - https://github.com/actions/first-interaction/issues/101#issuecomment-1262487501 — committed to keploy/keploy by slayerjain 2 years ago
- patch greetings action failing workflow (relates to https://github.com/actions/first-interaction/issues/101) — committed to crim-ca/weaver by fmigneault 2 years ago
- ci: ignore errors in greetings workflow See: https://github.com/actions/first-interaction/issues/101 — committed to chaos-genius/chaos_genius by Samyak2 2 years ago
- GH first-interaction action is busted, workaround This works around a busted actions/first-interaction@v1 until it's fixed https://github.com/actions/first-interaction/issues/101 Even after it's fix... — committed to mpeters/keylime by mpeters 2 years ago
- GH first-interaction action is busted, workaround This works around a busted actions/first-interaction@v1 until it's fixed https://github.com/actions/first-interaction/issues/101 Even after it's fix... — committed to mpeters/keylime by mpeters 2 years ago
- GH first-interaction action is busted, workaround This works around a busted actions/first-interaction@v1 until it's fixed https://github.com/actions/first-interaction/issues/101 Even after it's fix... — committed to keylime/keylime by mpeters 2 years ago
- Revert temp workaround for first-interaction https://github.com/actions/first-interaction/issues/101#issuecomment-1270291422 [ci skip] — committed to astropy/astropy by pllim 2 years ago
- fix: improve greetings workflow There was an issue https://github.com/actions/first-interaction/issues/101 with first-interaction solved by this PR https://github.com/actions/first-interaction/pull/1... — committed to osscameroon/js-generator by FanJups 2 years ago
- MNT: Temporary workaround for https://github.com/actions/first-interaction/issues/101 This should be reverted when upstream is fixed. [ci skip] — committed to dhomeier/astropy by pllim 2 years ago
- Revert temp workaround for first-interaction https://github.com/actions/first-interaction/issues/101#issuecomment-1270291422 [ci skip] — committed to dhomeier/astropy by pllim 2 years ago
If the action is non-blocking for your repo, you can use jobs.<job_id>.steps[*].continue-on-error:
v1.1.1
of this action has been released with the change from #103. Reference tov1
has been updated tov1.1.1
as well.Hi everyone! Thanks for reporting this, we’re aware of the issue
Just made a PR to fix this. But I don’t know who is supposed to review it.
This action should be using release tags so that we can lock to a working version. The continue-on-error workaround is a good short-term solution.
Same problem, since yesterday. These are our settings: https://github.com/unitaryfund/mitiq/blob/master/.github/workflows/greeting.yml
Happens for me as well.
Same here with default configuration.
Just noticed the problem for one of my repos as well.
Have the same problem with the default workflow configuration
Got the same issue here: https://github.com/manuelhenke/nuxt-envalid/actions/runs/3150929118/jobs/5124272833