Preferences

npm is not deprecated and is a pretty good choice. pnpm is a bit nicer in some details, but it's a nonstandard tool - use it if you're familiar with frontend development enough that you understand the tradeoffs you're making, but otherwise sick with npm.

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.


This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal