首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我不能用npm更新电子邮件

问我不能用npm更新电子邮件
EN

Stack Overflow用户
提问于 2015-08-31 20:19:27
回答 2查看 5K关注 0票数 7

我不能更新电子-预置的。我执行了sudo npm update electron-prebuilt -g很多次。

但是,尽管使用了sudo,但每次都会出现权限被拒绝的错误。

为什么我不能成功更新电子邮件?

iojs3.2.0,OS X 10.10.5

以下是错误日志。

代码语言:javascript
复制
/usr/local/lib/node_modules/electron-prebuilt/install.js:15
  throw err
  ^

Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/electron-prebuilt/electron-tmp-download-818-1441021602097/electron-v0.31.1-darwin-x64.zip' -> '/Users/user_name/.electron/electron-v0.31.1-darwin-x64.zip'
at Error (native)
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install" "electron-prebuilt" "-g"
npm ERR! node v3.2.0
npm ERR! npm  v2.14.1
npm ERR! code ELIFECYCLE

npm ERR! electron-prebuilt@0.31.1 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron-prebuilt@0.31.1 postinstall script 'node install.js'.
npm ERR! This is most likely a problem with the electron-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls electron-prebuilt
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/npm-debug.log
EN

回答 2

Stack Overflow用户

发布于 2015-09-13 00:30:09

在https://github.com/mafintosh/electron-prebuilt/issues/48上报告了该问题,解决方法似乎是先安装时不使用-g标志,该标志会首先将文件放入用户文件夹,然后使用-g再次安装。

编辑:我猜不知何故权限被搞乱了,我在做chmod。看起来,如果我不仅为用户自己,也为group和others使用chmod,它就能工作。也许其他人也可以试一试?

票数 4
EN

Stack Overflow用户

发布于 2016-06-09 08:25:51

我在OS X上也有同样的问题,我解决了删除~/.electron文件夹的问题

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32311095

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档