4 ms·
… node_modules is your venv. If we use uv from TFA, like the commands are nearly 1:1: npm install <=> uv sync npm install foo <=> uv add foo > It doe
by deathanatos 1y ago
… node_modules is your venv.
If we use uv from TFA, like the commands are nearly 1:1:
npm install <=> uv sync
npm install foo <=> uv add foo
> It doesn't have to also store a local copy of NodeJS
… which Node devs do have a thing for, too, called nvm, written in bash.
- frollogaston 1y agoThe difference is it's default, it always works the same everywhere, it actually writes down the deps, and I don't have to manually switch between them (or set up fancy bashrc triggers) like venvs.
- deathanatos 1y ago> it's default This point is true; the ecosystem simply can't change overnight. uv is getting there, I hope. > it always works the same everywhere `uv` works the same, everywhere? > it actually writes down the deps `uv add` does that, too. > I don't have to manually switch between them (or set up fancy bashrc triggers) like venvs. You don't have to do that with `uv`, either?
- deleted 1y ago[deleted]
- frollogaston 1y agoHope they make uv default then. It's nice, but I have to separately create a project with it, and regular python commands don't work with it, both of which go back to it not being default. But even that won't fix all the old projects.
- degamad 1y agonode is not the default in js projects either, it's just the currently most popular manager. Old JS projects are their own bundle of fun.
- frollogaston 1y agoBasically is by now. This is more of a recent thing for frontend JS, but NodeJS (which is more directly comparable to Python) had npm I think from the start. Those browser JS libs installed via <script> tags though, honestly were pretty convenient in a way.