
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
![NPM version][npm-badge] [npm-badge]: https://badge.fury.io/js/chnode.png
Change between installed Node versions in your current shell with a simple
chnode VERSION
. Leaves the system version untouched. Works out of the box with
Mac's Homebrew.
NODES
variable.Side note: I'm terribly ashamed of not yet having tests!
There are a few existing tools for switching Node versions, so how does Chnode.sh differ?
If you do insist on compiling and installing Nodes via 3rd party tools, check these out:
Install Chnode.sh globally with:
npm install --global chnode
Then source it in your shell:
. "$(npm bin --global)/chnode"
For convenience you might want to put the output of the following in your
.zshrc
or .bashrc
.
It'll be faster than running the line above with npm bin
which will slow down
your shell loading.
echo ". \"$(npm bin --global)/chnode\""
Change between installed Node versions with:
chnode 0.12.2
To change to the latest installed v0.11.x (e.g. Node 0.11.15):
chnode 0.11
To change to the latest v0.x:
chnode 0
To go back to the system version:
chnode system
Option | Description |
---|---|
-h, -?, --help | Display this help. |
-l, --list | List all available Node versions. |
-r, --refresh | Refresh and find all available Node versions. |
-v, --verbose | Be verbose when changing versions. |
-V, --version | Display version information. |
On the Mac Chnode.sh will find installed Nodes in /usr/local/Cellar/node
.
If you've got installations somewhere else, set the NODES
variable to an
array of paths of individual versions:
NODES+=(~/.nodes/*)
For example, if you've got Node compiled from the source at
~/Development/node-master
, append that:
NODES+=(~/Development/node-master)
If you think Chnode.sh should detect some of your paths automatically, please let me know by creating an issue. Thanks!
Chnode.sh is released under a Lesser GNU Affero General Public License, which in summary means:
For more convoluted language, see the LICENSE
file.
Andri Möll typed this and the code.
Monday Calendar supported the engineering work.
If you find Chnode.sh needs improving, please don't hesitate to type to me now at andri@dot.ee or create an issue online.
1.2.0 (Apr 26, 2015)
chnode
will return with a non-zero exit code when unable to locate the Node
version requested.-v
to -V
as the --version
shorthand to make room for
--verbose
.-v
and --verbose
for printing out the version and path switched to.0.12.2
you can use chnode 0
or chnode 0.12
.FAQs
Change between installed Node version in your shell.
We found that chnode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.