I’m using the tailwind-nextjs-starter-blog project and it uses husky to do pre-commit linting. This works fine on the command line, but within Sublime Merge commits fail with the following error:
.husky/pre-commit: line 4: npx: command not found
husky - pre-commit hook exited with code 127 (error)
I presume this means that npx
wasn’t found in the app’s PATH
, similar to this earlier thread. On my system, npx
is at ~/.asdf/shims/npx
and the PATH
in SM as reported by Help > Debug Information is:
PATH: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin (from shell)
I tried following the Homebrew suggestion from this other post and ran this in the Terminal:
sudo launchctl config user path "${HOME}/.asdf/shims:${PATH}"
I then restarted the system, but Sublime Merge’s PATH
hasn’t changed, and commits from within SM still fail with the same error.
Any suggestions?