Ubuntu 16.04 TLS
1 sudo apt-get install nodejs 2 sudo apt install nodejs-legacy 3 sudo apt install npm
Ubuntu 18.04 TLS
1 sudo apt-get install nodejs 2 sudo apt install libssl1.0-dev nodejs-dev node-gyp npm
1 sudo npm config set registry https://registry.npm.taobao.org 2 sudo npm config list
1 sudo npm install n -g 2 sudo n stable
1 sudo npm install -g cnpm --registry=https://registry.npm.taobao.org 2 sudo cnpm install -g electron
1 sudo npm install --unsafe-perm -g electron
1 # 克隆这仓库 2 git clone https://github.com/electron/electron-quick-start 3 # 进入仓库 4 cd electron-quick-start 5 # 安装依赖库 6 npm install 7 # 运行应用 8 npm start
安装Electron-vue
1 # 如果你没有vue-cli的话需要全局安装 2 npm install -g vue-cli 3 # 然后使用vue-cli来安装electron-vue的模板 4 vue init simulatedgreg/electron-vue my-project 5 6 # 安装依赖 7 cd my-project 8 yarn # or npm install 9 # 进入开发模式 10 yarn run dev # or npm run dev