【发布时间】:2020-06-05 23:46:19
【问题描述】:
我在命令前加上了sudo,因为我在第一次尝试时遇到了'Permission Denied' 错误。建议以管理员身份运行该命令,或者最好还是删除/usr/local/lib/node_modules 处的整个电子文件夹并重新安装。我这样做并第二次安装它,但我仍然收到以下错误:
(node:85821) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdtemp '/usr/local/lib/node_modules/electron/electron-download-KXtUtz' (node:85821) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:85821) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. + electron@8.0.1 added 85 packages from 93 contributors in 8.968s ➜ / electron -v /usr/local/lib/node_modules/electron/index.js:14 throw new Error(**'Electron failed to install correctly, please delete node_modules/electron and try installing again'**)
【问题讨论】:
标签: javascript node.js macos npm electron