Mac安装vuecli或者electron时npmi报错

编程

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

以上是 Mac安装vuecli或者electron时npmi报错 的全部内容, 来源链接: utcz.com/z/515950.html

回到顶部