基于node.js、chromium的本地app开发框架electron,官方有三步安装使用法:

# Clone the Quick Start repository
$ git clone https://github.com/electron/electron-quick-start

# Go into the repository
$ cd electron-quick-start

# Install the dependencies and run
$ npm install && npm start

在npm install这一步,经常会出现下载出问题,如果是windows 10,将下载类似“electron-v1.4.3-win32-x64.zip”这样的文件,大约50MB,经常下一半就断了,下次还要重新来过。

这时候需要设置系统环境变量:

ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"

如果是windows,在“系统”-》“高级系统设置”-》“环境变量”-》“系统变量”-》“新增”中增加即可。

如果是linux,设置:

export ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"

标签: none 阅读量: 973

添加新评论