Skip to content

fix: not working in yarn 4 pnp #3752

Closed
Closed
@0xHexE

Description

@0xHexE

Expected Behavior

Should lint the commit message

Current Behavior

yarn commitlint --edit $1
/home/user/workspace/project/.yarn/cache/@commitlint-cli-npm-18.4.0-d320f2e322-e23220a58f.zip/node_modules/@commitlint/cli/lib/cli.js:123
        throw err;
        ^
TypeError: Cannot read properties of undefined (reading '.cjs')
    at getDynamicAwaitConfig (/home/user/workspace/project/.yarn/cache/@commitlint-load-npm-18.4.0-188370ee62-c84655f211.zip/node_modules/@commitlint/load/lib/utils/load-config.js:73:53)
    at loadConfig (/home/user/workspace/project/.yarn/cache/@commitlint-load-npm-18.4.0-188370ee62-c84655f211.zip/node_modules/@commitlint/load/lib/utils/load-config.js:19:73)
    at load (/home/user/workspace/project/.yarn/cache/@commitlint-load-npm-18.4.0-188370ee62-c84655f211.zip/node_modules/@commitlint/load/lib/load.js:19:55)
    at main (/home/user/workspace/project/.yarn/cache/@commitlint-cli-npm-18.4.0-d320f2e322-e23220a58f.zip/node_modules/@commitlint/cli/lib/cli.js:189:45)
Node.js v19.9.0
husky - commit-msg hook exited with code 1 (error)

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

No response

Steps to Reproduce

1. Setup project with yarn4 and enable pnp.
2. Try to run cli

Context

No response

commitlint --version

@commitlint/[email protected]

git --version

v2.41.0

node --version

v19.9.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