But if npm/yarn/whatever works for you, just use that thing. The mindset of having to move to whatever "mainstream developers" are using today is what is causing you problem, not that alternative solutions exists in the first place.
Edit: also npx is just an alias for npm exec, allowing you to run scripts in npm packages
I think part of the problem is this thinking that
- you must change things all the time (yarn is still good why switch?)
- the things you change to are somehow really new (pnpm is 9 years old)
I'm grateful that LLMs are great at writing frontend code for me, though the broader implications are a bit scary.
npx is a tool bundled with node/npm for running commands in isolated environments. It's mostly useful in two situations:
* You want to run a particular NPM-distributed tool as a one-off, and have the tool installed outside of your current project and then uninstalled afterwards. This can be useful for scaffolding or trying out tools released using NPM.
* You have a local project and one of the dev dependencies provides a utility to e.g. lint the code or run a migration. npx allows you to directly call commands installed locally without having to set up `npm run` beforehand.
If you don't know why you need it, you don't need it.
As a dependency management toolchain I recommend reading: https://dev.to/thejaredwilcurt/bun-hype-how-we-learned-nothi...
I had some issues with it using it briefly (though it was way faster than other installers I've used)
Corepack is marked experimental but trust us bro
oh if you don't have corepack just install it globally (this is fine)
If you do have it, you have to opt into the experiment by running "corepack enable"
So simple