NPM permission error while installing

前端 未结 4 1314
别那么骄傲
别那么骄傲 2021-01-14 09:19

i am trying to install yeoman on my server but for some reason do i keep getting a permission denied error.

$npm install -g yo
/root/.node/bin/yo -> /root         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-14 09:49

    You need to have root permission to install this so try "sudo npm install -g yo" instead of "npm install -g yo"

提交回复
热议问题