Sivo 悉见

electron无法安装的问题

匿名 · 更新于 2023/10/12

使用electron,安照官方例子,结果是失败的。原因是下载官网的二进制包失败,结果不能执行。

也用了npm的镜像:registry = “https://registry.npmmirror.com/”,也不行。

后来网上折腾一段时间,看到一个开源项目(基于electron),写到要在npm设置electron的镜像,才可以。

使用命令:npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/

完后,再重新npm install,再npm start,解决。