我安装了哈士奇,几个月来它一直运行良好,但在重新启动之后,今天突然出现了这样的错误:
husky - command not found in PATH=/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core:/usr/bin:/bin:/usr/sbin:/sbin
.husky/pre-commit: line 4: npx: command not found我不知道是什么导致了这一切,但我无法做出改变。显然,我可以绕过钩子,但我想解决这个问题。
发布于 2022-08-09 19:16:10
我搜索了googs,发现运行以下命令是有效的:
sudo launchctl config user path `echo $PATH`这是我从哪里得到它的来源:https://github.com/typicode/husky/issues/666#issuecomment-651919165
它包括解决方案来源的上下文:https://community.atlassian.com/t5/Bitbucket-questions/SourceTree-Hook-failing-because-paths-don-t-seem-to-be-set/qaq-p/274792
https://stackoverflow.com/questions/73297006
复制相似问题