npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

in npm with 0 comment views: 171 times

原因

权限问题

方案

1、一次性方案

sudo npm install -g yarn

2、终身方案

npm set prefix ~/.npm
PATH="$HOME/.npm/bin:$PATH"
PATH="./node_modules/.bin:$PATH"
Responses