JulienKode / pull-request-name-linter-action

⚡️ Lint pull request name with commit lint. This is useful if you squash merge your pull requests ⚡️

Home Page:https://github.com/marketplace/actions/pull-request-linter-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix: Error ERR_REQUIRE_ESM - require() of ES Module not supported

42atomys opened this issue · comments

Hello since today any workflow with pull-request-name-linter-action cransh with this error

Error: Error [ERR_REQUIRE_ESM]: 
require() of ES Module /home/runner/work/repo/node_modules/@commitlint/config-conventional/lib/index.js from /home/runner/work/_actions/JulienKode/pull-request-name-linter-action/v0.5.0/dist/index.js not supported.
Instead change the require of /home/runner/work/repo/node_modules/@commitlint/config-conventional/lib/index.js in /home/runner/work/_actions/JulienKode/pull-request-name-linter-action/v0.[5](https://github.com/org/repo/actions/runs/8197591753/job/22419784725?pr=21#step:4:6).0/dist/index.js to a dynamic import() which is available in all CommonJS modules.
Error: require() of ES Module /home/runner/work/repo/node_modules/@commitlint/config-conventional/lib/index.js from /home/runner/work/_actions/JulienKode/pull-request-name-linter-action/v0.5.0/dist/index.js not supported.
Instead change the require of /home/runner/work/repo/node_modules/@commitlint/config-conventional/lib/index.js in /home/runner/work/_actions/JulienKode/pull-request-name-linter-action/v0.5.0/dist/index.js to a dynamic import() which is available in all CommonJS modules.

Encounter this issue too. Has anyone been able to solved the issue?