4 ms·
I prefer python package management to whatever is happening in the node.js world.
by clarionbell 3y ago
I prefer python package management to whatever is happening in the node.js world.
- agos 3y agowhat is happening in the node.js world? people typing npm install and then being done is somehow worse than the Python situation?
- fragmede 3y agoNode.js installs the libraries into the `node_modules` subfolder in the working directory of the project. Python installs the libraries in to a system dir (unless you're using venv or conda or whatever). This means that dependency mismatches are resolved on a per-project level with node.js but are on a system-wide basis for python. If `npm install` is failing, it's not unreasonable to just run `rm -rf node_modules` and then try again. Worst that happens is that project is still broken. Meanwhile, if I nuke `/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/*` on my mac to try and resolve a problem, I've broken everything else that uses python 3.11 on my system. The failure scenario with Python is when two or more projects need conflicting version of numpy or scipy or whatever. Then you start fighting with pyenv/poetry/venv/conda/docker to get a different environment to run it in. As noted, it works, eventually, but it's just more work. More work is just more work and we as developers hate doing busy work like that.