Skip to content

fix: fails to load config file on Node v24.0.0 #4399

Open
@sodle-splunk

Description

@sodle-splunk

Steps to Reproduce

Place the following in `commitlint.config.js`:

export default { extends: ['@commitlint/config-conventional'] };


Run: 

echo 'feat: example commit' | commitlint

Current Behavior

Commitlint fails to load the config file:

⧗   input: feat: example commit
✖   Please add rules to your `commitlint.config.js`
    - Getting started guide: https://commitlint.js.org/guides/getting-started
    - Example config: https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional/src/index.ts [empty-rules]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

Expected Behavior

Commitlint should run and accept this commit

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Context

This issue appeared when Node 24 was released yesterday, it works fine on v22 and v23.

This is an issue because commitlint-pre-commit-hook always uses the latest version of Node. I will be filing a ticket with that project as well, recommending that they use the LTS version instead.

commitlint --version

@commitlint/[email protected]

git --version

git version 2.39.5 (Apple Git-154)

node --version

v24.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions