NVM & Node.js - Recommended install for all users

后端 未结 6 1773

is there a recommended install for nvm so all users can use it? i cannot find anything on the web regarding this.

this is what i did

  • installed nvm in a
6条回答
  •  自闭症患者
    2020-12-07 10:45

    There is also this fork of nvm designed for global usage: https://github.com/xtuple/nvm

    wget -qO- https://raw.githubusercontent.com/xtuple/nvm/master/install.sh | sudo bash
    
    sudo chown -R $USER /usr/local/nvm
    
    nvm install 8
    

    Update : I tried various ways to use xtuple's nvm and also n to manage a global node environment and I always ran into edge cases where there were issues. In the end what worked best for me was to download a few versions of node from their website and uncompress them to /usr/local. Then update my path with the version I want. e.g.

    export PATH=/usr/local/node-v7.10.1-linux-x64/bin:$PATH
    

    Note: You will probably have to chmod 777 the node path or dedicate one user to mange it.

提交回复
热议问题