码迷,mamicode.com
首页 > Web开发 > 详细

使用 nvm 安装 node.js 和 io.js

时间:2015-06-15 09:10:56      阅读:259      评论:0      收藏:0      [点我收藏+]

标签:

来源:https://github.com/creationix/nvm#install-script

 

brew install nvm

source ...

echo "..." >> ~/.profile

nvm install stable # 安装最新的node.js

nvm install iojs # 安装最新的io.js

Node Version Manager

 

Usage:

  nvm help                              Show this message

  nvm --version                         Print out the latest released version of nvm

  nvm install [-s] <version>            Download and install a <version>, [-s] from source. Uses .nvmrc if available

  nvm uninstall <version>               Uninstall a version

  nvm use <version>                     Modify PATH to use <version>. Uses .nvmrc if available

  nvm run <version> [<args>]            Run <version> with <args> as arguments. Uses .nvmrc if available for <version>

  nvm current                           Display currently activated version

  nvm ls                                List installed versions

  nvm ls <version>                      List versions matching a given description

  nvm ls-remote                         List remote versions available for install

  nvm deactivate                        Undo effects of `nvm` on current shell

  nvm alias [<pattern>]                 Show all aliases beginning with <pattern>

  nvm alias <name> <version>            Set an alias named <name> pointing to <version>

  nvm unalias <name>                    Deletes the alias named <name>

  nvm reinstall-packages <version>      Reinstall global `npm` packages contained in <version> to current version

  nvm unload                            Unload `nvm` from shell

  nvm which [<version>]                 Display path to installed node version. Uses .nvmrc if available

 

Example:

  nvm install v0.10.32                  Install a specific version number

  nvm use 0.10                          Use the latest available 0.10.x release

  nvm run 0.10.32 app.js                Run app.js using node v0.10.32

  nvm exec 0.10.32 node app.js          Run `node app.js` with the PATH pointing to node v0.10.32

  nvm alias default 0.10.32             Set default node version on a shell

 

Note:

  to remove, delete, or uninstall nvm - just remove ~/.nvm, ~/.npm, and ~/.bower folders

使用 nvm 安装 node.js 和 io.js

标签:

原文地址:http://www.cnblogs.com/yxzblue/p/4576258.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!