npm command - sudo or not?

前端 未结 5 790
梦如初夏
梦如初夏 2020-12-01 03:11

Currently I always run sudo npm install but as I understand it\'s not correct.

I want to have opportunity not to use it as root/Adm

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 03:47

    You can also do:

    sudo chown -R $USER /usr/local
    

    and recursively change the files to your current user.

提交回复
热议问题