Install different versions of NodeJS

后端 未结 6 635
栀梦
栀梦 2020-12-08 18:37

Is it possible to have different versions of NodeJS installed on the same machine?

6条回答
  •  星月不相逢
    2020-12-08 19:06

    I use nave. https://github.com/isaacs/nave

    > npm install -g nave
    > nave use 0.4.12 # starts a subshell with 0.4.12 at the head of the path
    > node --version
    v0.4.12
    > exit # go back to the original shell
    > nave use 0.6.5
    > node --version
    v0.6.5
    > nave usemain
    

    Note that the first time you need a version, it will be downloaded and compiled for you.

提交回复
热议问题