乐趣区

关于javascript:permission-denied-mkdir-usrlocallibnodemodulesvue

mac 装置 vue-cli 时报错

PS /Users/hb> npm install -g @vue/cli

npm ERR! code EACCES

npm ERR! syscall mkdir

npm ERR! path /usr/local/lib/node_modules/@vue

npm ERR! errno -13

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue'

解决

sudo npm install -g @vue/cli --unsafe-perm 
退出移动版