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 badges1 Answer
Reset to default 6I 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条)