Here's a quick tip for y'all.
This year I've had issues with loading CLIs on either MacOS or Linux machines because my shell didn't have the directory for the binaries in the $PATH variable, which is where your command line of choice tries to locate everything you run when you don't prepend the directory to the command; either because of switching between Node versions, or installing it with brew, or using a different shell (like zsh for some reason).
All you have to do is add this line in your shell config; on MacOS, it probably is
.zshrc (using zsh), while on Linux it probably is
.bashrc (using Bash).
export PATH=$(npm config get prefix)/bin:$PATH
What this does is append your binaries folder to the $PATH by checking the prefix. In my case it is currently
/usr/local/Cellar/node/13.5.0, because I use Brew. Other common locations are
/usr/local/bin/node. See for yourself by running
npm config get prefix. Don't forget to either reload your config or open a new session.
Hope this helps you avoid some hours of troubleshooting and wondering if that tool is broken for you or everyone.
Claim your page on DEV before someone else does
Level up every day