I am unable to install Angular Cli globally through npm. I keep getting this error when I run npm install -g @angular/cli on macOS:
npm install -g @angular/cli
npm ERR! nod
WARNING: Check that $(npm config get prefix) does not point to /usr by typing echo $(npm config get prefix)
$(npm config get prefix)
/usr
echo $(npm config get prefix)
I solved like that
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
Worked for me