After upgrade to husky v5, git commit from vscode always fail (via terminal is ok).

> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
.husky/pre-commit: line 4: npx: command not found
husky - pre-commit hook exited with code 127 (error)
npm version: 7.5.1
node version: 15.8.0
Hooks
// pre-commit
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged
After upgrade to husky v5, git commit from vscode always fail (via terminal is ok).
npm version: 7.5.1
node version: 15.8.0
Hooks