Categories
Laravel Mac Samuel

Fixing NPM Install Error

Ran into this error today when running NPM install on a project:

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1

To Fix this we ran:

xcode-select --print-path
# in my case /Library/Developer/CommandLineTools

# next line deletes the path returned by the command above
sudo rm -rf $(xcode-select --print-path)

# install the tools(again) with
xcode-select --install

Source: https://stackoverflow.com/questions/60573595/npm-install-fails-on-node-gyp-rebuild-with-gyp-no-xcode-or-clt-version-detec 

Once you complete the commands above now run npm install again and live is good 🙂