javascript - Can't commit using husky: .huskypre-commit: line 4: npx: command not found - Stack Overflow

I have installed husky and it was working fine for months and then out of the blue today after a restar

I have installed husky and it was working fine for months and then out of the blue today after a restart this error came up:

husky - mand not found in PATH=/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core:/usr/bin:/bin:/usr/sbin:/sbin
.husky/pre-mit: line 4: npx: mand not found

I don't know what could have caused it but I can't mit my changes. Obviously I could bypass the hook but I want to fix this issue.

I have installed husky and it was working fine for months and then out of the blue today after a restart this error came up:

husky - mand not found in PATH=/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core:/usr/bin:/bin:/usr/sbin:/sbin
.husky/pre-mit: line 4: npx: mand not found

I don't know what could have caused it but I can't mit my changes. Obviously I could bypass the hook but I want to fix this issue.

Share Improve this question asked Aug 9, 2022 at 19:16 mishchiefmishchief 5414 silver badges13 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

I went scouring the googs and found that running the following mand works:

sudo launchctl config user path `echo $PATH`

This is the source of where I got it from: https://github./typicode/husky/issues/666#issuement-651919165

Which includes the context of where the solution came from: https://munity.atlassian./t5/Bitbucket-questions/SourceTree-Hook-failing-because-paths-don-t-seem-to-be-set/qaq-p/274792

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745341400a4623343.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信