sudo: npm: command not found

前端 未结 25 2673
渐次进展
渐次进展 2020-11-28 01:19

I\'m trying to upgrade to the latest version of node. I\'m following the instructions at http://davidwalsh.name/upgrade-nodejs

But when I do:

sudo np         


        
25条回答
  •  执念已碎
    2020-11-28 01:59

    If you have downloaded node package and extracted somewhere like /opt you can simply create symbolic link inside /usr/local/bin.

    /usr/local/bin/npm -> /opt/node-v4.6.0-linux-x64/bin/npm
    /usr/local/bin/node -> /opt/node-v4.6.0-linux-x64/bin/node
    

提交回复
热议问题