node-gyp rebuildgyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue/cli/node_modules/fse... ...
node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@vue/cli/node_modules/fsevents/build'
gyp ERR! System Darwin 19.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/@vue/cli/node_modules/fsevents
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
嘗試使用
sudo npm install -g electron --unsafe-perm=true --allow-root
sudo npm install -g @vue/cli --unsafe-perm=true --allow-root
原文鏈接https://kiros.onbeta.com/Node-js/mac-an-zhuangvue-cli-huo-zheelectron-shi-npm-i-bao.html