4 ms·
I think the most important thing Node did right was shipping an official package manager/manifest format/etc. alongside the runtime, from the very beginning. Th
by brundolf 5y ago
I 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.