Not sure why the question was down-voted, but I had the same issue and following the blog post recommended solve the issue. One thing I should add is that in my case, once I ran:
npm config set prefix /usr/local
I confirmed the npm root -g
was pointing to /usr/local/lib/node_modules/npm
, but in order to install gulp
in /usr/local/lib/node_modules
, I had to use sudo
:
sudo npm install gulp -g