Install different versions of NodeJS

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

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

6条回答
  •  甜味超标
    2020-12-08 19:05

    You can follow simple approach here

    step1:

     $ curl https://raw.githubusercontent.com/creationix/nvm/v0.11.1/install.sh | bash
    

    step2:

     $ source ~/.profile
    

    step3: list the latest versions of node

     $ nvm ls-remote
    

    step4:

      $  nvm install 7.10.0
    

    step5: Create alias as default for node version

    $ nvm alias default 7.10.0
    

    step6:

    $node --version
    

    that's it.

提交回复
热议问题