commitlint icon indicating copy to clipboard operation
commitlint copied to clipboard

fix: Did you mean to import "cosmiconfig-typescript-loader/dist/cjs/index.cjs"?

Open marafat opened this issue 1 year ago • 2 comments

Steps to Reproduce

1. Upgrade from v18 to v19 
2. run `git cz`

Current Behavior

Error:

$ git cz
[email protected], @commitlint/[email protected]

Cannot find module '<project_local_path>/node_modules/cosmiconfig-typescript-loader/dist/esm/index.mjs' imported from <project_local_path>/node_modules/@commitlint/load/lib/utils/load-config.js
Did you mean to import "cosmiconfig-typescript-loader/dist/cjs/index.cjs"?

Expected Behavior

Prompt to load and allow commiting.

Affected packages

  • [ ] cli
  • [ ] core
  • [ ] prompt
  • [ ] config-angular

Possible Solution

No response

Context

package.json before:

"devDependencies": {
    "@commitlint/cli": "18.6.1",
    "@commitlint/config-conventional": "18.6.2",
    "@commitlint/cz-commitlint": "18.6.1",
    "commitizen": "4.3.0",
}

package.json after:

"devDependencies": {
    "@commitlint/cli": "19.3.0",
    "@commitlint/config-conventional": "19.2.2",
    "@commitlint/cz-commitlint": "19.2.0",
    "commitizen": "4.3.0",
}

Config file commitlint.config.cjs

commitlint --version

@commitlint/[email protected]

git --version

git version 2.39.3 (Apple Git-146)

node --version

v20.14.0

marafat avatar Jul 02 '24 15:07 marafat

Hm, which version of cosmiconfig-typescript-loader have you installed?

escapedcat avatar Jul 03 '24 08:07 escapedcat

In my yarn.lock I have "cosmiconfig-typescript-loader@npm:^5.0.0": which is set as a dependency on @commitlint/[email protected]

marafat avatar Jul 08 '24 13:07 marafat