I npm install everything locally, never globally, and use npm run script to easily execute (and chain) stuff.
Am I in the minority?
I npm install everything locally, never globally, and use npm run script to easily execute (and chain) stuff.
Am I in the minority?
E.g. you could do something like:
cd ~/Desktop/foo
npm i somepkg
echo console.log(require('somepkg')()) > index.js
jetpack
And now you're running some pkg in the browser, to try/test it out. That's what the use case for this feature really is. For real apps, I install it locally as well or else a breaking change in the future could cause issues.https://github.com/asdf-vm/asdf
Now, a few new languages do come with pretty decent "virtual env" thingy-s , but most stumble for a few years.
So far (past year) I've been pretty happy with asdf. Mostly use it for ruby and node - but also rust and golang, lisp, Java and ocaml (mostly as a "consumer" of various cli tools, and/or toy projects.
Then, when you `cd` into your project directory, your environment with all its dependencies appears.
However, there are some downsides to this magical future tech:
+ Nix is hard to learn.
+ Not compatible with the standard environment managers for each language.
* nodemon
* npm-check
* ndb
* serve
* webtorrent-cli
* jetpack
Global installs are for modules that are outside your projects dev cycle. With that in mind, a module such as nodemon can be installed both globally and locally. It depends on the use case.
No, you are not. The disconnect between actual developers that know better than to rely on global pollution and the silly READMEs and blog posts that prescribe it is an interesting phenomena. It's also gone on long enough that I feel a little shouting is in order.