一 下载代码
git clone https://github.com/gxchain/gxchain-alpha.git
二 安装包yarn管理器
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
三 安装依赖库
cd gxchain-alpha
yarn install
四 运行
npm run dev
五 总结
1 遇到的问题因为用npm install安装依赖库,会报如下异常(安装electron相关库失败),于是我改用yarn安装成功了
npm ERR! path /home/li/Documents/gxchain-alpha/node_modules/_spectron@3.8.0@spectron/node_modules/electron-chromedriver
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/home/li/Documents/gxchain-alpha/node_modules/_spectron@3.8.0@spectron/node_modules/electron-chromedriver'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/li/.npm/_logs/2018-08-17T07_26_27_192Z-debug.log