3 ms·
I'm no js/node fan, but I'd say it's a hell of a lot easier to install and manage dependencies with npm (or yarn) than in python. To the extent that people joke
by OJFord 5y ago
I'm no js/node fan, but I'd say it's a hell of a lot easier to install and manage dependencies with npm (or yarn) than in python. To the extent that people joke about/are horrified by the number of dependencies managed by them in a typical project. There's just a lot more tooling around it that's somewhat official/default/the one way.
With pip you can manually pin versions, or 'freeze' what's currently installed, but then updating them is a manual effort or a third-party service like pyup.io.
> which languages do people feel have excellent package management?
Rust (technically cargo) is probably the best I've seen or used.
- brundolf 5y agoI think the most important thing Node did right was shipping an official package manager/manifest format/etc. alongside the runtime, from the very beginning. There is no fragmentation; yarn exists but it's a 100% equivalent drop-in replacement. Everybody's on the same page. Check out the source, run one command, and you're ready to go. The second most important thing they did right was install dependencies locally in the project directory. There is no global state or environment dependency (unless you go out of your way to install some tool globally). Want to do a clean install? rm -rf node_modules and you're done. The only system-wide prerequisite is a single Node installation. No environment variables, nothing. One mistake they did make was punting on the management of different Node versions, so you have to reach for nvm and any swapping-out has to happen at a global level. Cargo made the right decision to in-house this. However, even then, in my experience it's rarely an issue because Node is so stable.