3 ms·
npm install -g I'm seeing this regularly in node.js projects. Why is it common to install globally and, well, crap up your system like that? Are they running
by spindritf 13y ago
npm install -g
I'm seeing this regularly in node.js projects. Why is it common to install globally and, well, crap up your system like that?
Are they running each app in a separate container/vm? This one seems to made for desktop though.
- AaronO 13y agoThe global install is only for when you're running it locally on your machine (it isn't fully packaged for the desktop yet, but will be soon). On our cloud service (https://www.codebox.io https://www.codebox.io) we do run each app in a seperate container/VM of course.
- joshuacc 13y agoThe only time I see this is when installing a command-line utility of some kind. For instance, if you install express with -g you can generate an app skeleton. Installing libraries globally would be a problem, but it doesn't seem like this is what Codebox is doing.
- samsquire 13y agonpm install -g is more like apt-get install If you don't want global state you could use a VM? It's global because it is not per project. For example, I don't want to install a tool in every folder that I might happen to use it in. (Or bother setting paths and symlinks)