sudo: npm: command not found

前端 未结 25 2657
渐次进展
渐次进展 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 02:03

    My solution is:

    sudo -E env "PATH=$PATH" n stable
    

    Works fine for me.

    Found it here: https://stackoverflow.com/a/29400598/861615

    This happens because you have change default global packages directory

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