re: When to Use Global NPM Installs? Rarely VIEW POST

FULL DISCUSSION
 

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.

code of conduct - report abuse