admin管理员组文章数量:1421921
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
本文标签: javascriptCan39t commit using husky huskyprecommit line 4 npx command not foundStack Overflow
版权声明:本文标题:javascript - Can't commit using husky: .huskypre-commit: line 4: npx: command not found - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745341399a2654278.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论