workspace sudo npm install -g vue-cli
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "vue-cli"
npm ERR! node v6.2.0
npm ERR! npm v3.8.9
npm ERR! path /tmp/npm-476-41426030
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir '/tmp/npm-476-41426030'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, mkdir '/tmp/npm-476-41426030'
npm ERR! at Error (native)
npm ERR! errno: -1,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/tmp/npm-476-41426030' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/liucheng/workspace/npm-debug.log
如上,在Mac上全局安装,爆出了这个错,已经加了sudo
已经使用了各种能够搜索到的方法,包括
npm cache clean
等等,但是还是不能行。试试手动给/tmp 文件夹加下权限呢