logoalt Hacker News

mmoustafayesterday at 8:15 AM1 replyview on HN

Although this is what Opus recommends, it will give you many issues as you don’t really have any node runtimes in the path (or worse if you do).

What I recommend is replacing it with $PATH=(a command to find the nvm default alias directory, detect the verion and load it from that specific version directory directly) so you always have default node in path and then lazy loading only nvm itself, so you can switch when you need to.

Sorry I don’t have the command handy as I’m on mobile but if you paste the above into Opus you’ll get it.


Replies

prodigycorpyesterday at 8:23 AM

Thanks. I modified my comment to disclose that gpt 5.2 generated that modification. I'll try your suggestion.