-
Notifications
You must be signed in to change notification settings - Fork 554
git: 'cz' is not a git command. See 'git --help'. #289
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
Comments
I'm not an expert on where npm puts things, but something I noticed is you have If that doesn't work, you might have more luck on superuser.com. |
That's very astute. Thank you. I have since killed the VM I was using to try that. I believe ´NodeJS´ and ´npm´ were installed on it using ´apt´. I am now on a different VM, where I know I installed ´NodeJS´ and ´npm´ with ´nvm´. Now I have no problem at all. |
I believe that @pmcelhaney's solution is probably the correct one, please feel free to reopen if you have problems with it... |
I had to install |
this should be documented somewhere. |
If you don't want to install
|
Can you explain what |
First of all install commitizen using the package manager you prefer. There is no need for you to install it globally Then run
If you get an error that Then run the binary directly using |
Thanks @Parth909 ! It works now |
@ghacosta This doesn't work |
It worked for me-- OSX, using it for a Husky v8 setup. |
- For the husky v.8 not use the `.huskyrc` file for set the configuration. Set the configuration inside the `.husky` folder, in the individual files as the `commit-msg` hook. https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v8 Steps: - Add the next command to the `commit-msg` hook: `npx --no -- commitlint --edit $1` Error: - Error: Cannot find module "@commitlint/config-conventional" from "/Applications/MAMP/htdocs/vue-todolist" at resolveId (/Users/beatrizsmerino/.npm/_npx/16d437951fea4b5e/node_modules/@commitlint/resolve-extends/src/index.ts:131:14) - ✖ body's lines must not be longer than 100 characters [body-max-line-length] ✖ found 1 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint Solution: - Install locally the packages: `npm install @commitlint/cli @commitlint/config-conventional --save-dev` `npm install commitizen cz-conventional-changelog --save-dev` - Update the configuration `commitlint`, increase the `body-max-line-length` References: - https://www.youtube.com/watch?v=jNxDNoYEGVU - https://www.youtube.com/watch?v=OJqUWvmf4gg - https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13 - https://github.com/qoomon/git-conventional-commits - https://remarkablemark.org/blog/2019/05/29/git-husky-commitlint/ - https://typicode.github.io/husky/#/?id=husky_git_params-ie-commitlint- - https://stackoverflow.com/a/67074398 - https://rahulgurung.com/How-to-use-the-latest-Husky-8-with-Commitizen-for-adding-git-hooks-to-your-projects/ - https://www.techiediaries.com/git-hooks-husky-commitlint/ - https://www.freecodecamp.org/news/how-to-use-commitlint-to-write-good-commit-messages/ - https://medium.com/dottech/mejorando-los-mensajes-de-git-commit-con-husky-y-commitlint-7bddf6ab22c2 - commitizen/cz-cli#289 - https://github.com/conventional-changelog/commitlint - conventional-changelog/commitlint#613 - https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/index.js - https://github.com/conventional-changelog/commitlint/blob/master/docs/reference-rules.md#body-max-line-length
you have to make the file executable |
I don't know how to deal with this.
I assumed it was simply a Path or symlink issue but got no where at all trying to understand how they work between
bash
,npm
,git
andcommitizen
.install
run
.profile
.npmrc
system
Please let me know if you need more information.
The text was updated successfully, but these errors were encountered: