FAQ
Error: require() of ES Module ... not supported
- If you are an ESM project (i.e.,
"type": "module"in package.json),- You can try changing the configuration name from
.jsto.cjs.
- You can try changing the configuration name from
- If you are using commitlint version (> 18),
- For example, configuring
extends: ['@commitlint/config-conventional'], - Please upgrade cz-git or czg to the latest version.
- For example, configuring
Can I customize the message format ?
- The configuration contains most of the message format fine-tuning requirements, such as changing the emoji position with emojiAlign.
- formatMessageCB: It is the final format callback function. You can configure it to achieve the message format you need.
Configure load not as expected
Run the command to check the path of the configuration load
sh
# commitizen cli
CZ_DEBUG=1 cz
# czg cli
CZ_DEBUG=1 czg# commitizen cli
CZ_DEBUG=1 cz
# czg cli
CZ_DEBUG=1 czgOpening a like vim editor in git hooks mode
The
prepare-commit-msggithook opens an editor after the commit message has been prepared => githooks man
- Changing the default editor from
vitocatshgit config --local core.editor catgit config --local core.editor cat - Adding package scripts initialization script
prepareor pnpm'spostinstallto assist other contributors with initializationdiff{ "scripts": { - "prepare": "husky install" + "prepare": "husky install && git config --local core.editor cat" } }{ "scripts": { - "prepare": "husky install" + "prepare": "husky install && git config --local core.editor cat" } }
Cannot find the command after global install
- Enter the command
npm prefix -gto check whether the bin folder path of npm's global download is added to the system environment variable$PATH. - Most likely because using nvm changed the npm global download path prefix, but the system environment variable was not recorded.
Terminal cannot display Emoji symbols
- The terminal cannot Emoji symbols, the high probability is because your terminal has poor support for emoji/unicode characters, but it does not affect the submission Because the final output is submitted by Emoji Code, you can consider changing the terminal and font
What is different between cz-git and czg
See more Why czg
- If you using
czorgit czcommand will startcommitizenCLI +cz-gitadapter - If you using
czgorgit czgcommand will only startczgCLI
cz-git