Netlify husky: not found error

Hello,

Our projects are currently experiencing problems with the Netlify deploy-preview. We are getting this error:

sh: 1: husky: not found
npm ERR! code 127
npm ERR! path /opt/build/repo
npm ERR! command failed
npm ERR! command sh -c husky install

Is there something we can do to fix it? (we already tried clear cache and deploy site option but it fails immediately).

Thank you in advance for your help.

Hi @inna

The error you mentioned is usually caused when the required command is not available probably because of the missing package. This Build troubleshooting tips | Netlify Docs section of the documentation might help you.

In short, you need to install husky as a dependency before you can run that command.

Let us know if you have any additional questions.