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 ERR! nod
Important Note: My answer has vulnerability issues. Giving permissions as root. Use it only after analyzing the effect on your system.
After using
sudo npm install -g PACKAGE-NAME --unsafe-perm=true --allow-root
I still had issues creating a project with the CLI. these commands, allowing permissions, fixed it:
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config