If you get the following message, then there’s a very easy fix:
npm ERR! could not determine executable to run

The solution – using npm

1
2
rm -rf .git/hooks
npm install

The solution – using yarn

1
2
rm -rf .git/hooks
yarn install