Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'git-branch' #857

Open
BartusZak opened this issue Nov 9, 2021 · 1 comment
Open

Cannot find module 'git-branch' #857

BartusZak opened this issue Nov 9, 2021 · 1 comment

Comments

@BartusZak
Copy link

Hey,

I can not run commitizen.

Error:

yarn cz
yarn run v1.22.17
$ /home/bartuszak/gitlab/web-common/node_modules/.bin/cz
Cannot find module 'git-branch'
Require stack:
- /home/bartuszak/gitlab/web-common/commitizen.js
- /home/bartuszak/gitlab/web-common/node_modules/commitizen/dist/commitizen/adapter.js
- /home/bartuszak/gitlab/web-common/node_modules/commitizen/dist/commitizen.js
- /home/bartuszak/gitlab/web-common/node_modules/commitizen/dist/cli/git-cz.js
- /home/bartuszak/gitlab/web-common/node_modules/commitizen/bin/git-cz.js
- /home/bartuszak/gitlab/web-common/node_modules/commitizen/bin/git-cz
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

"commitizen": "4.2.1",

OS:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

Thanks for any hints.

@costaevangelista
Copy link

I had a similar problem when updating an old package and in my case the problem was that in my package.json I had the following config:

  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  }

I was getting the issue even when I'd updated to ^3.0.2, and found I had to update the config to:

  "config": {
    "commitizen": {
      "path": "cz-conventional-changelog"
    }
  }

Ref: commitizen/cz-conventional-changelog#89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants