commitlint: Commitlint cli running 19.0.3 gives error

Steps to Reproduce

1. Install commitlint and set up config (ref https://commitlint.js.org/reference/configuration.html)

npm install --userconfig=./.npmrc -g commitlint-config
2. Run commitlint

this works with v18.6.1 as expected

Current Behavior

 code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}
internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises
    at new NodeError (internal/errors.js:322:7)
    at Loader.builtinStrategy (internal/modules/esm/translators.js:289:11)
    at new ModuleJob (internal/modules/esm/module_job.js:63:26)
    at Loader.getModuleJob (internal/modules/esm/loader.js:258:11)
    at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:78:21)
    at async Promise.all (index 1)
    at async link (internal/modules/esm/module_job.js:83:9) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}
internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises
    at new NodeError (internal/errors.js:322:7)
    at Loader.builtinStrategy (internal/modules/esm/translators.js:289:11)
    at new ModuleJob (internal/modules/esm/module_job.js:63:26)
    at Loader.getModuleJob (internal/modules/esm/loader.js:258:11)
    at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:78:21)
    at async Promise.all (index 1)
    at async link (internal/modules/esm/module_job.js:83:9) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}
internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(

Expected Behavior

⧗   input: Merge pull request 
✔   found 0 problems, 0 warnings
⧗   input: style: formatting
✔   found 0 problems, 0 warnings
⧗   input: test: add test
✔   found 0 problems, 0 warnings
⧗   input: feat: new feat
✔   found 0 problems, 0 warnings

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

No response

commitlint --version

19.0.3

git --version

2.25.1

node --version

18.x

About this issue

  • Original URL
  • State: open
  • Created 4 months ago
  • Comments: 19 (18 by maintainers)

Most upvoted comments

The warning is occurred on installation AFAIK.

@moran-inadvantag I don’t think we support legacy node v14, node v18+ is required.

Please provide online reproduction, not just error messages, that doesn’t help.