4 ms·
Even npm (despite its many flaws) is in far better shape than pip.
by techman9 10y ago
Even npm (despite its many flaws) is in far better shape than pip.
- efrafa 10y agoI might be the only one, but I think npm is even better than bundler.
- morgante 10y agoI'm with you there too. npm is by far the best package manager I've ever used.
- LukaD 10y agoFor me npm has always been the worst dependency manager I've used. What bugs me the the most is that it installs all packages to node_modules by default. It is possible to specify another location but then your application will probably break because it has to know where your node_modules directory is. Then there's the whole non-determinism thing: https://docs.npmjs.com/how-npm-works/npm3-nondet https://docs.npmjs.com/how-npm-works/npm3-nondet Also check out https://github.com/npm/npm/issues/10999 https://github.com/npm/npm/issues/10999 This is just insane!
- Groxx 10y agoPip has the same kinds of issues with transitive dependencies, but way way way worse since it doesn't allow multiple versions. When you have lib A requiring C ("A -> C1") and "B -> C2", the version of C you get depends on which of A or B was installed first, because the second's requirements are flat-out ignored. Probably like 90% of the python projects I've looked at have requirement-conflicts because pip doesn't even warn you about this.
- derimagia 10y agoThere are some issues with it, but think more about it's concepts. I agree at the very least that npm is better than pip, but I feel like pip is really outdated. I'm surprised so many people who are saying it's fine and that setup.py is fine... I think it's just they're more familiar with it. Check out yarn as well, some of it's practices are really awesome - getting inspiration from bundler and cargo. This is as someone who doesn't use either of these languages that much. Even composer is better than pip IMO.
- Ajedi32 10y agoThat's interesting, because personally I always found the fact that npm installs to `node_modules` to be one of its best features. No need for RVM Gemsets or python Virtualenv; everything gets installed inside your project directory and just works. Additionally, since each package gets its own `node_modules` directory, there's no need to worry about conflicting dependencies. Multiple versions of the same module can run in the same process with no interference.
- Groxx 10y agoMinus the horrific bloat and slow install processes, and when you add a shrinkwrap file (otherwise prod runs who-knows-what)[1]: yeah, npm is pretty fantastic. No conflicts ever, super simple, they did a lot right. Fits in perfectly with the low-developer-brain-cost JS ecosystem. [1] this is quite a large number of cases, but they are significant drawbacks.
- henrygrew 10y agoNpm is surprisingly good and simple
- conceptme 10y agoI prefer composer defaults. Always save dependencies to the composer.json (eay to forget --save) Always create a lock file when doing composer install I do sort of like node's ability to recursively nest dependencies to avoid dependency hell. Though that has it's downsides too.. you will never know what is in your modules dir.