Updating a Yeoman Generator After Moving to NVM

Didn’t come across anything on StackOverflow, so posting this here in case any other folks come across this issue.

A while back I had installed a generator for building Chrome Extensions (thanks Jimmy Moon (문현경)!) using Yeoman, before I started using NVM to manage different versions of Node.

So easy enough, I ran my updates:

npm install -g yo && npm install -g generator-chrome-extension

But everytime I tried running yo chrome-extension it kept installing the old version, with Grunt and all : /

Hmm, I figured it had to be a reference to my old Node modules. But even running an npm cache clean wasn’t helping.

Lo and behold, it’s because in the olden days of 2015, running a global install of npm would put node_modules inside of your usr directory.

The Solution

Easy. Hope that helps anyone else out there.