I'm running macOS Mojave, and I've tried installing the Google Lighthouse package for Node.JS using the NPM package manager using the following npm install command with the -g option to install the package globally:
npm install lighthouse -g
But no matter what I do I get the -bash: lighthouse: command not found error indicating that the command is not recognized by macOS, or perhaps it didn't export correctly. I even tried source ~/.bash_profile, but it didn't help.
I even tried to uninstall Lighthouse with npm remove lighthouse -g and ran the following to remove the cache for NPM:
sudo npm cache clean -f
sudo npm install -g n
I then reinstalled with npm install lighthouse -g and it still says that the command isn't found. I even tried closing all my terminal windows, but the command is still not found.
When I execute the node --version command it returns: v12.16.1, and npm -v returns 6.13.4. Is the lighthouse command not compatible with v12 of Node.js?
I'm at my wits end. Does anyone have any idea what's going on? Do I need to export the path for the package or something? Did I miss something else?