Using nvm and node on os x

2016-08-30  本文已影响0人  drunkcat2020

Using nvm and node on os x

nvm alias < name > < version >

nvm install node (the default verison of node is the lastest one)

nvm install 5.0.0(are there some diffecence between install node gloabl and local?)

some tricks to use alias in node :

  1. delete alias < name > ;

  2. nvm which ; to show the path tp install node,but must be on .Users or .nvmrc ?

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

  3. nvm ls : to show the version installed of node

  4. nvm current: to show the currnet activated version

  5. nvm --version : to print out the latest released version of nvm.

  6. node -v : to show the current node version.

thinkerdeMacBook-Pro:projects thinkerchen$ nvm use node
    Now using node v6.5.0 (npm v3.10.3)
thinkerdeMacBook-Pro:projects thinkerchen$ node -v
    v6.5.0
thinkerdeMacBook-Pro:projects thinkerchen$ nvm use node5
    Now using node v5.0.0 (npm v3.3.6)
thinkerdeMacBook-Pro:projects thinkerchen$ node -v
    v5.0.0
thinkerdeMacBook-Pro:projects thinkerchen$ 

thinkerdeMacBook-Pro:Users thinkerchen$ cd thinkerchen/documents/code

上一篇下一篇

猜你喜欢

热点阅读