Skip to content

Instantly share code, notes, and snippets.

@nickcharlton
Created January 28, 2024 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickcharlton/91f25fd516fce916f9065cd4802a6766 to your computer and use it in GitHub Desktop.
Save nickcharlton/91f25fd516fce916f9065cd4802a6766 to your computer and use it in GitHub Desktop.
Gist from Drafts

Local Node Versions w/chnode & node-build

This follows the same pattern as using chruby, which is quite nice. Configured to autoload from .node-version.

https://github.com/tkareine/chnode https://github.com/nodenv/node-build

chnode

  • List available Node versions: chnode
  • Use a Node: chnode 16.20.2
  • Reload Nodes: chnode --reload

node-build

  • List known Node versions: node-build --definitions
  • Install a Node version: node-build 18.19.0 ~/.nodes/node-18.19.0
  • Symlink a Node version to allow for just 18 in .node-version: ln -s ~/.nodes/node-16.20.2 ~/.nodes/node-16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment