logoalt Hacker News

shhsshstoday at 3:46 PM1 replyview on HN

I use aliases that lazily load nvm when I actually want to use it. This converts the shell startup penalty into a node/npm startup penalty.


Replies

abejfehrtoday at 4:40 PM

This wasn't an option for us because as an org we used their recommended hook (1) to automatically change node versions when switching directories, but it effectively undoes the lazy loading.

With mise you get the behaviour of automatically switching when you change directories effectively for free.

1. https://github.com/nvm-sh/nvm#zsh

Edit: unless you aliased it to `node` or `npm`, which would be fine I guess but super annoying if you ran node or npm commands often. It is not worth the hassle, no one should use nvm in 2026 imo