xy-electron-sdk-test
v0.0.12
Published
xylink electron sdk
Downloads
4
Readme
XY ELECTRON SDK
运行环境安装
按顺序执行:
- 打开终端(Terminal)窗口,输入如下命令安装 Homebrew,如果已经安装请跳过此步骤。
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 安装Node环境
# 安装node版本管理工具 n
$ brew install n
# 通过n安装稳定版本Node环境
$ n latest
# 查看安装是否成功
# 如果输出版本信息,则安装成功
$ node -v
- 安装Node包管理工具: yarn
$ brew install yarn
# 设置为淘宝镜像源,加速安装依赖
$ yarn config set registry https://registry.npm.taobao.org
- 安装repo依赖
# 执行
$ yarn i
- 如果安装依赖提示此信息:
error An unexpected error occurred: "/Users/luojinghui/work/xylink/project/electron/xy-electron-sdk/node_modules/electron: Command failed.
Exit code: 1
Command: sh
Arguments: -c node install.js
Directory: /Users/luojinghui/work/xylink/project/electron/xy-electron-sdk/node_modules/electron
Output:
RequestError: connect ECONNREFUSED 0.0.0.0:443
at ClientRequest.request.once.error (/Users/luojinghui/work/xylink/project/electron/xy-electron-sdk/node_modules/got/source/request-as-event-emitter.js:178:14)
at Object.onceWrapper (events.js:273:13)
at ClientRequest.emit (events.js:187:15)
at ClientRequest.origin.emit.args (/Users/luojinghui/work/xylink/project/electron/xy-electron-sdk/node_modules/@szmarczak/http-timer/source/index.js:37:11)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
请手动删除根目录的 package.json
文件中的 electron
,然后执行:
$ ELECTRON_MIRROR="https://cdn.npm.taobao.org/dist/electron/" yarn add electron