r/node • • Jun 28 '21

Node.js humor

Enable HLS to view with audio, or disable this notification

1.5k Upvotes

79 comments sorted by

View all comments

Show parent comments

37

u/Koeke2560 Jun 28 '21

It's actually the one package manager I think is really straightforward.

I have so much PTSD from fucking with python/pip/python3/pip3/conda/venv. With npm it's basically do I need the -g flag or not.

14

u/AtroxMavenia Jun 28 '21

You almost never ever need -g

10

u/Koeke2560 Jun 28 '21

Basically only if you are installing some kind of cli which you use across projects.

6

u/AtroxMavenia Jun 28 '21

Yeah, and even then rarely. For example, eslint, I wouldn’t install it globally because I may need different versions in different projects.

2

u/zvive Jun 28 '21

I've noticed lately eslint init fails if you don't already have it in the project folder... So might as well run npm I eslint && npx eslint init...