NPM and NODE command not found when using NVM

后端 未结 1 1590
天涯浪人
天涯浪人 2020-12-22 03:05

Seen other questions, but I think they are not my case.

I think the problem is over here, but I don\'t know how to solve it:

I do have latest Node version in

相关标签:
1条回答
  • 2020-12-22 03:32

    If you want to install the version you want in the place you want then you can follow my tutorial here on GitHub:

    • https://gist.github.com/rsp/edf756a05b10f25ee305cc98a161876a

    It's about version 6.7.0 but you can change it to any other version. It show you how to install either from source or from binary packages and following that tutorial you will always know which version is where, because you have full control over the installation instead of relying on tools that do that automatically for you.

    If you want to have Node 7.3.0 in /usr/local for example the it is just:

    wget https://nodejs.org/dist/v7.3.0/node-v7.3.0.tar.gz
    tar xzvf node-v7.3.0.tar.gz
    cd node-v7.3.0
    ./configure --prefix=/usr/local
    make && make test && echo OK || echo ERROR
    sudo make install
    
    0 讨论(0)
提交回复
热议问题