You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am actually quite new to husky and commitlint. I've been searching numerous issues related to this bug in this repo. However, I couldn't find a solution.
At first, on my commit-msg, I try to remove the npx --no -- commitlint --edit $1, It showed this log when I committed with git commit -m "build: add configuration eslint prettier and husky"
✔ Preparing lint-staged...
✔ Hiding unstaged changes to partially staged files...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Restoring unstaged changes to partially staged files...
✔ Cleaning up temporary files...
But when I appended that line, my commit got this error.
✔ Preparing lint-staged...
✔ Hiding unstaged changes to partially staged files...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Restoring unstaged changes to partially staged files...
✔ Cleaning up temporary files...
npm ERR! canceled
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASUS\AppData\Local\npm-cache\_logs\2023-03-05T14_55_41_633Z-debug-0.log
husky - commit-msg hook exited with code 1 (error)
Current Behavior
Adding the npx --no -- commitlint --edit $1, I've got this error.
✔ Preparing lint-staged...
✔ Hiding unstaged changes to partially staged files...
✔ Running tasks for staged files...
✔ Applying modifications from tasks...
✔ Restoring unstaged changes to partially staged files...
✔ Cleaning up temporary files...
npm ERR! canceled
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASUS\AppData\Local\npm-cache\_logs\2023-03-05T15_20_57_145Z-debug-0.log
husky - commit-msg hook exited with code 1 (error)
On the log, it said. I have no clue what I should do.
0 verbose cli C:\Program Files\nodejs\node.exe C:\Users\ASUS\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:C:\Users\ASUS\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 6ms
6 timing config:load:builtin Completed in 6ms
7 timing config:load:cli Completed in 5ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:E:\Sekolah\Tugas Kuliah\Semester 7\TA\myits-puspresnas-nextjs\.npmrc Completed in 0ms
10 timing config:load:project Completed in 9ms
11 timing config:load:file:C:\Users\ASUS\.npmrc Completed in 0ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\ASUS\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:credentials Completed in 2ms
17 timing config:load:setEnvs Completed in 3ms
18 timing config:load Completed in 31ms
19 timing npm:load:configload Completed in 31ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm exec commitlint --edit .git/COMMIT_EDITMSG
23 verbose argv "exec" "--yes" "false" "--" "commitlint" "--edit" ".git/COMMIT_EDITMSG"
24 timing npm:load:setTitle Completed in 2ms
25 timing config:load:flatten Completed in 5ms
26 timing npm:load:display Completed in 7ms
27 verbose logfile logs-max:10 dir:C:\Users\ASUS\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\ASUS\AppData\Local\npm-cache\_logs\2023-03-05T15_20_57_145Z-debug-0.log
29 timing npm:load:logFile Completed in 14ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 61ms
33 silly logfile start cleaning logs, removing 2 files
34 timing arborist:ctor Completed in 2ms
35 silly logfile done cleaning log files
36 http fetch GET 200 https://registry.npmjs.org/commitlint 1106ms (cache revalidated)
37 timing arborist:ctor Completed in 0ms
38 timing command:exec Completed in 1152ms
39 verbose stack Error: canceled
39 verbose stack at exec (C:\Users\ASUS\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmexec\lib\index.js:177:17)
39 verbose stack at async module.exports (C:\Users\ASUS\AppData\Roaming\npm\node_modules\npm\lib\cli.js:78:5)
40 verbose cwd E:\Sekolah\Tugas Kuliah\Semester 7\TA\myits-puspresnas-nextjs
41 verbose Windows_NT 10.0.22621
42 verbose node v18.14.0
43 verbose npm v8.12.1
44 error canceled
45 verbose exit 1
46 timing npm Completed in 1449ms
47 verbose code 1
48 error A complete log of this run can be found in:
48 error C:\Users\ASUS\AppData\Local\npm-cache\_logs\2023-03-05T15_20_57_145Z-debug-0.log
I use Yarn v1, hence #2990 comment is not working also.
I've tried this solution #3555 comment, It is also got the same cancelled error.
When I run npx directly in my terminal.
echo "build: add configuration eslint prettier and husky" | npx commitlint // give no output, I think it is working
echo "with husky" | npx commitlint // give problems output as I intended
Because the .git folder was outside of my husky directory, I required to add cd .. && husky install frontend/.husky in prepare. Hence, based on this Husky Custom Directory, I should add another cd frontend in my hooks.
Sorry for the inconvenience. I will close this issue.
Because the .git folder was outside of my husky directory, I required to add cd .. && husky install frontend/.husky in prepare. Hence, based on this Husky Custom Directory, I should add another cd frontend in my hooks.
Sorry for the inconvenience. I will close this issue.
Hello, I would like to ask where cd frontend sentence was added, because I originally had a line cd *** in the commit-msg file.
Uh oh!
There was an error while loading. Please reload this page.
Expected Behavior
I am actually quite new to husky and commitlint. I've been searching numerous issues related to this bug in this repo. However, I couldn't find a solution.
In my
commit-msg
fileAt first, on my
commit-msg
, I try to remove thenpx --no -- commitlint --edit $1
, It showed this log when I committed withgit commit -m "build: add configuration eslint prettier and husky"
But when I appended that line, my commit got this error.
Current Behavior
Adding the
npx --no -- commitlint --edit $1
, I've got this error.On the log, it said. I have no clue what I should do.
I use Yarn v1, hence #2990 comment is not working also.
I've tried this solution #3555 comment, It is also got the same cancelled error.
When I run npx directly in my terminal.
echo "build: add configuration eslint prettier and husky" | npx commitlint
// give no output, I think it is workingecho "with husky" | npx commitlint
// give problems output as I intendedAffected packages
Possible Solution
No response
Steps to Reproduce
yarn install
git commit -m "build: add configuration eslint prettier and husky"
and it produced the earlier issuesContext
I'm trying to use another rule and ensure the same type of commit message in my project. I use yarn version 1 and run this program on Windows.
commitlint --version
@commitlint/cli@^17.4.4
git --version
v2.34.1.windows.1
node --version
v18.14.0
The text was updated successfully, but these errors were encountered: