Microsoft: "TypeScript 2.8 is here...! [Install it] by running
`npm install -g typescript`"
No. Stop. Don't do that. Don't npm install -g a tool you need in your project. Install it as a dependency (possibly dev) _of_ your project, so that other people who use your code don't have to globally modify their system to get your code to work.
As luck would have it, I've written about this very topic. https://spin.atomicobject.com/2016/02/22/npm-install-dangerous/ #Node #JavaScript
@mulander Yeah. And this invariably leads to someone having to figure out why their project is using the wrong version of a tool that doesn't support some new feature, or deprecated an old one.
I, too, have wondered what the thought process is when you tell someone to install a package globally...
@zigg Not to mention that now with tools like npx (shipping with npm5+), you can easily run a package from anywhere without installing it globally upfront
@zigg
This is one of my favorite things about Nix. I can specify the exact tools people need for my project and they won't gave to taint their global environment.
Now... Convincing other people to use these tools/methods for isolation is hard. That's why instructions usually have a npm|pip|apt install instead.
@nixy I loved Nix in theory, but I burned out trying to contribute. That was years ago, though.
@zigg people cargo cult, each time I see some tool written in javascript its install instructions start either with `sudo wget.. | bash` or `sudo npm install -g`. People just don't care about learning to package software for their systems.