Getting strange error: subject may not be empty [subject-empty]
See original GitHub issueThis started a few days ago all of a sudden.
Here’s the full output:
Command failed with exit code 1: git commit -m "refactor: to use a constant name for the handler fn name"
husky > pre-commit (node v12.16.0)
[STARTED] Preparing...
[SUCCESS] Preparing...
[STARTED] Running tasks...
[STARTED] Running tasks for *.(js|ts)
[STARTED] Running tasks for package.json
[SKIPPED] No staged files match package.json
[STARTED] eslint --fix
[SUCCESS] eslint --fix
[SUCCESS] Running tasks for *.(js|ts)
[SUCCESS] Running tasks...
[STARTED] Applying modifications...
[SUCCESS] Applying modifications...
[STARTED] Cleaning up...
[SUCCESS] Cleaning up...
husky > commit-msg (node v12.16.0)
⧗ input: "refactor: to use a constant name for the handler fn name"
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 2 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
husky > commit-msg hook failed (add --no-verify to bypass)
If I run exactly the same command from CLI it works just fine:
git commit -m "refactor: to use a constant name for the handler fn name"
Any ideas?
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top Results From Across the Web
husky - Strange error when attempting to commit. [subject-empty]
There is a package called husky that defines a certain template for your commit messages. If the template is not fulfilled, one gets...
Read more >"subject-empty" is over-flagged #2761 - GitHub
My point is that it seems nonsensical to say "subject may not be empty". The commit's subject isn't empty, it's "Try out commitlint."...
Read more >Solved: Email triggered flow fails with empty subject
Solved: Hello, I have a cloud flow which is triggered by incoming emails. Based on the email subject different actions are taken.
Read more >git commit 规范不对导致报错 - CSDN博客
最近几次git commit 的时候总是遇到错误,抛出的问题都是:✖ subject may not be empty [subject-empty]✖ type may not be empty [type-empty]找了 ...
Read more >Commitlint: Write more organized code - LogRocket Blog
For the subject, consider the following rules: use the imperative, present tense: “change,” not “changed” nor “changes”; do not capitalize the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
same issue, latest version Command failed with exit code 1: git commit -m “fix(1): 1” husky > commit-msg (node v12.4.0) ⧗ input: “fix(1): 1” ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty] ✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint husky > commit-msg hook failed (add --no-verify to bypass)
Thanks for all the feedback and sorry for the inconvenience. I’ll create a new release with the fix. Will be v0.9.3