[Solved] Npm ERR! Could Not Determine Executable to Run

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

rm -rf .git/hooks
npm install

The solution – using yarn

rm -rf .git/hooks
yarn install