# electron-vue-admin-serial **Repository Path**: redfalsh/electron-vue-admin-serial ## Basic Information - **Project Name**: electron-vue-admin-serial - **Description**: 基于electron-vue-admin编写的带有串口功能,用于测试应用程序 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-15 - **Last Updated**: 2021-10-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # electron-vue-admin > An electron-vue project This is a vue electron admin project base on [vueAdmin-template](https://github.com/PanJiaChen/vueAdmin-template) , and was generated from [electron-vue](https://github.com/SimulatedGREG/electron-vue) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about this project can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html). ## Build Setup ``` bash # install dependencies npm install # serve with hot reload at localhost:9080 npm run dev # build electron app for production npm run build # lint all JS/Vue component files in `app/src` npm run lint # run webpack in production npm run pack ``` --- ## Build Error Deal - 参考链接: - [electron-vue项目构建打包错误失败问题合集](https://blog.csdn.net/qq_43548590/article/details/120021371) - [electron打包踩过的坑总结](https://segmentfault.com/a/1190000018533945) **1. 关于task的bug** 这个bug是很多人反馈过的,在.electron-vue/build.js中重复申明了task,导致在打包时报错,所以需要对其中一个task进行重命名,我的习惯是将 ``` const tasks = ['main', 'renderer'] const m = new Multispinner(tasks, { preText: 'building', postText: 'process' }) ``` 改为 ``` const tasks1 = ['main', 'renderer'] const m = new Multispinner(tasks1, { preText: 'building', postText: 'process' }) ``` **2.出现错误** ``` Application entry file “dist\electron\main.js” in the “D:\electronWork\new-edu-001\build\win-unpacked\resources\app.asar” does not exist ``` 我们需要安装`multispinner`, 然后在`.electron-vue/build.js` 文件中添加一句 ``` const Multispinner = require('multispinner') ``` **3.下载编译相关依赖包速度慢问题** 在build的时候会因为下载远程打包所需文件而超时, 根据安装超时提示的版本进行对应手动下载. 1.需要下载 `electron-v2.0.18-win32-x64.zip` 淘宝electron镜像包地址: https://npm.taobao.org/mirrors/electron/ 在镜像中选取该版本号 2.0.18,点击进入,并选择下载 electron-v2.0.18-win32-x64.zip 和 SHASUMS256.txt, 下载完成后,将SHASUMS256.txt文件改成 SHASUMS256.txt-2.0.18,然后将两个文件拷入以下位置: `C:\Users\fsc\AppData\Local\electron\Cache` 目录结构: ``` cache |- electron-v2.0.18-win32-x64.zip |- SHASUMS256.txt-2.0.18 ``` 2.需要下载 `winCodeSign-2.4.0` 下载地址:https://github.com/electron-userland/electron-builder-binaries/releases/tag/winCodeSign-2.4.0 下载后解压放入以下目录: `C:\Users\fsc\AppData\Local\electron-builder\cache` ``` cache |- winCodeSign | |-winCodeSign-2.4.0 ``` 3.需要下载 `nsis-3.0.3.2` nsis下载地址:https://github.com/electron-userland/electron-builder-binaries/releases/tag/nsis-3.0.3.2 下载后解压放入以下目录: `C:\Users\fsc\AppData\Local\electron-builder\cache` ``` cache |- nsis | |-nsis-3.0.3.2 | |-nsis-resources-3.3.0 ``` 4.`nsis-resources-3.3.0` 同上3 ## Demo ![](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/electron-login.png) ![](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/electron-admin.gif) ## Download Mac: [app release](https://github.com/PanJiaChen/electron-vue-admin/releases/tag/v3.0.0)