Wow, I seem to be on a roll for fixing issues on a relatively quick time frame these days.

Mac OS X 10.9
npm -v 2.5.1
node -v 0.12.0

When running npm install -g yo to install Yeoman globally, I get the all too familiar screen.

terminal window screenshot

One of the last lines of the error message that npm returns says npm ERR! Please try running this command again as root/Administrator.

I have made this mistake once and it was enough to know that when using npm, if you can't install it without using the sudo command, you should research what the problem is and not do what this last line asks you to do.

Thank goodness I stumbled upon this post from Aral Balkan, who explains the correct way to fix this error.

sudo chown -R $USER /usr/local

Many thanks Aral!

© 2023. All Rights Reserved.

Proudly published with Ghost