When to Use Global NPM Installs? Rarely

Tally Barak on October 09, 2019

It is widespread to go on a quick start page of some tool and utility and find instructions similar to this one: npm install - global cool-pack... [Read Full]
markdown guide

Hi, Tally. Good read, I agree completely. Global installs are meant for CLI tools you use frequently with no relation to a specific node application.

One small correction tho (pro tip): when you run npm run build --watch the --watch flag applies to npm and not to the internal command. If you want to pass arguments in use the -- operator (getopt), which will pass all subsequent arguments onto your script npm run build -- --watch


You are absolutely right. This was the original intent, but lost in editing (I copied the article from a draft elsewhere). Thanks for the comment.


Very true, ever since it being able to reference the binary, I've been going through and cleaning these up in all the projects I come across. 😄

code of conduct - report abuse