Electron 安装第三步,安装依赖失败

来源:1-2 配置开发环境

慕莱坞7528191

2019-06-19

Error: EACCES: permission denied, mkdir '/Users/xxx/electron-quick-start/node_modules/electron/dist’
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron@5.0.4 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron@5.0.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xxx/.npm/_logs/2019-06-19T14_25_41_840Z-debug.log

(我用了sudo了)

写回答

2回答

张轩

2019-06-23

同学 请看这个帖子 https://stackoverflow.com/questions/16151018/npm-throws-error-without-sudo

或者运行下 

sudo chown -R $(whoami) ~/.npm


0
0

fengyunzhu

2019-06-21

重启电脑再试一下,或者使用cnpm或者yarn安装依赖

0
0

Electron开发仿网易云音乐播放器

站内首门Electron课程,让你更专注应用的核心开发

3428 学习 · 159 问题

查看课程