npm throws error without sudo

前端 未结 30 1974
清酒与你
清酒与你 2020-11-21 07:43

I just installed node and npm through the package on nodejs.org and whenever I try to search or install something with npm it throws the following error, unless I sudo the c

30条回答
  •  花落未央
    2020-11-21 08:07

    This looks like a permissions issue in your home directory. To reclaim ownership of the .npm directory execute:

    sudo chown -R $(whoami) ~/.npm
    

提交回复
热议问题