Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Should I add ~/node_modules/.bin to my $PATH #957

timoxley opened this Issue · 2 comments

4 participants


local as default is really frustrating, just wondering if adding ~/node_modules/.bin to my path would fix me having to use -g EVERY time i install a module that comes with a commandline tool?


You can add whatever folder to your path that you like :)

Of course, then it'll only work if you do a local install in ~. If you're in some other folder, it won't put the bin in ~/node_modules. But, you could put node_modules/.bin in your PATH, and then you'll be able to use the bins installed in that folder when you're in that folder.

@isaacs isaacs closed this

I know this is an old ticket, but it shows up on google for "npm which PATH", so I thought I'd leave my work around here.

This only works on sh, bash, zsh (pretty much any shell that uses ~/.bashrc, ~/.profile etc):

disclaimer: it's ugly, but it makes using node_modules/.bin easy.

@othiym23 othiym23 added the support label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.