TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function | husky - commit-msg hook exited with code 1 (error)
Error message :
internal/util.js:214
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
^
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
at promisify (internal/util.js:214:11)
at Object.<anonymous> (c:\node_modules\@commitlint\cli\node_modules\get-stream\index.js:7:35)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (c:\node_modules\@commitlint\cli\node_modules\execa\lib\stream.js:3:19)
husky - commit-msg hook exited with code 1 (error)
Root cause:
Husky can prevent you from bad
git commit
,git push
, and more. If you are getting this error check your code syntax. In case you are getting this error even if your code is valid, please use the below solution.
Solutions to fix "TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function | husky - commit-msg hook exited with code 1 (error)"
Solution 1:
Delete the
.git/hooks
folder and then do thenpm install
to reinstall husky. There are chances for conflicts with husky-generated files in the.git/hooks/ files
.
Solution 2: this is a temporary/quick solution.
or
By GoDevStack.com
git config --unset core.hooksPath
Post a Comment
Thank for leaving message