Update node.js version inside Cloud 9 IDE

后端 未结 3 1455
日久生厌
日久生厌 2020-12-23 21:53

My Cloud 9 workspace is running with Node.Js 0.10. How can I update it to the latest version of Node.Js (today is 0.12.4)?

I\'m trying to install Node.Js using apt-g

相关标签:
3条回答
  • 2020-12-23 22:07

    With Cloud 9 you can use NVM to install a new version of Node.js. Just run:

    nvm install 5.5.0
    nvm use 5.5.0
    nvm alias default v5.5.0
    

    NVM keeps all the versions so you can switch back whenever you want.

    See also https://docs.c9.io/v1.0/docs/writing-a-nodejs-app.

    0 讨论(0)
  • 2020-12-23 22:24

    To improve on Davide Icardi's answer, this installs the latest stable version:

    nvm install stable
    

    Worked for me in Cloud9.

    0 讨论(0)
  • 2020-12-23 22:26

    Are you running Debian/Ubuntu? As an alternative to nvm, you can:

    curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
    sudo apt-get install -y nodejs
    

    source

    0 讨论(0)
提交回复
热议问题