try googling on how to run the terminal on a mac as an admin,for ubuntu i always get that error if i do not run npm install command as a sudo
try googling on how to run the terminal on a mac as an admin,for ubuntu i always get that error if i do not run npm install command as a sudo