Electron 7.x以上版本安装提示错误解决方法
升级使用最新的Electron 7.x以上版本,运行提示electron不存在,其实是因为electron install时候对应平台的可执行文件没有下载成功,错误提示如下:
(node:18000) UnhandledPromiseRejectionWarning: Error: EPERM: operation not permitted, lstat ‘C:\Users\JUNCHU~1\AppData\Local\Temp\electron-download-4VfCX9\electron-v7.1.7-win32-x64.zip‘ (node:18000) 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:18000) [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. npm WARN 0.1.47 No repository field.
在官方的Git Issues找到了解决方案,就是修改使用另一个淘宝镜像地址。执行命令:
npm config set ELECTRON_MIRROR=https://cdn.npm.taobao.org/dist/electron/
相关推荐
游走的豚鼠君 2020-11-10
sanallen 2020-07-04
electronvolt 2020-07-04
sanallen 2020-06-14
moyigg 2020-06-09
疯狂老司机 2020-06-07
zhujuyu 2020-06-06
moyigg 2020-06-01
zhujuyu 2020-05-30
viewerlin 2020-05-29
zhujuyu 2020-05-28
yanchuncheng 2020-05-12
Trustport 2020-05-06
chenyijun 2020-05-05
electronvolt 2020-05-04
游走的豚鼠君 2020-05-01
electronvolt 2020-04-21
游走的豚鼠君 2020-04-18