The Node version manager
Shell
Clone or download
acecode and joyeecheung tnvm.sh: fix egrep on MacOS (#30)
**can't install node**
```
$ tnvm install node-v8.1.4
Version 'node-v8.1.4' not valid.
```
Tested on newly installed MacOS 10.12.5

`[-\.a-z]+?` does't match empty string
`([-\.a-z]+)?` does match empty string

```shell
 ~ echo 'node-abc' | egrep -o '[a-z]+-[a-z]+'
node-abc
~ echo 'node-' | egrep -o '[a-z]+-[a-z]+' 
~ echo 'node-' | egrep -o '[a-z]+-[a-z]+?' 
~ echo 'node-' | egrep -o '[a-z]+-([a-z]+)?'
node-
```
Latest commit 1250398 Jul 18, 2017
Permalink
Failed to load latest commit information.
.gitignore tnvm.sh: support tags with dashes Jul 5, 2017
LICENSE Initial commit Jul 22, 2015
README.md add curl tips Jun 12, 2017
install.sh patch: git地址变更 Jan 7, 2016
tnvm.sh tnvm.sh: fix egrep on MacOS (#30) Jul 17, 2017

README.md

tnvm

Taobao Node Version Manager

Installation

wget -O- https://raw.githubusercontent.com/aliyun-node/tnvm/master/install.sh | bash

使用curl(Mac 已内置)

bash -c "$(curl -fsSL https://raw.githubusercontent.com/aliyun-node/tnvm/master/install.sh)"

PS: 内网环境或者代理环境可在执行上述命令前增加执行, 使用wget获取文件

export METHOD=script

手动source rc文件或重新打开sh,即可启动。

如果遇到 ssl 证书问题, 尝试wget加上选项--no-check-certificate

Usage

Support alinode, node, iojs, node-profiler version manager

tnvm lookup 查看 alinode 基于 node 的版本, 便于替换相应版本。

Example install alinode:

  • tnvm ls-remote alinode
  • tnvm lookup
  • tnvm install alinode-v1.0.1
  • tnvm use alinode-v1.0.1

Example install node:

  • tnvm install node-v4.2.1
  • tnvm use node-v4.2.1

Example install node-profiler:

  • tnvm install profiler-v0.12.6
  • tnvm use profiler-v0.12.6

More:

  • refer to tnvm help

Note:

  • to remove, delete, or uninstall tnvm - just remove ~/.tnvm folders

License

tnvm is released under the MIT license.