electron-vue 安装打包心得

编程入门 行业动态 更新时间:2024-10-22 03:00:04

npm 安装 由于网络等原因失败 改用淘宝镜像也不行

组后使用yarn 安装成功 但是打包出问题 是由于安装的时候缺少东西

最后成功的方法

、安装yarn

        npm install -g yarn  或 cnpm install -g yarn

2、yarn 设置淘宝源

        yarn config set registry https://registry.npm.taobao -g 

        yarn config set sass_binary_site http://cdn.npm.taobao/dist/node-sass -g

3、删除项目根目录 node_modules

4、使用命令 yarn 或 yarn install 重新安装依赖

5、yarn run build    重新打包

但是打包时出现错误Application entry file “dist\electron\main.js” in the “D:\electronWork\new-edu-001\build\win-unpacked\resources\app.asar” does not exist

解决方法:

yarn add multispinner -D 

然后在.electron-vue/build.js 文件中添加一句

const Multispinner = require('multispinner')

打包由于网络原因会报 

• packaging       platform=win32 arch=x64 electron=2.0.18 appOutDir=build\win-unpacked
  ⨯ Get https://github/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.4.0/winCodeSign-2.4.0.7z: read tcp 192.168.16.131:53834->20.205.243.166:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
。。。

Error: E:\electron_workspace\electron-vue-app\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code 1
    at ChildProcess.<anonymous> (E:\electron_workspace\electron-vue-app\node_modules\builder-util\src\util.ts:244:14)
    at Object.onceWrapper (events.js:483:26)
    at ChildProcess.emit (events.js:376:20)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
From previous event:
    at processImmediate (internal/timers.js:462:21)

多尝试几次就好了

参考自:https://www.jianshu/p/3d681539ac50

https://blog.csdn/qq_43548590/article/details/120021371

更多推荐

electron-vue 安装打包心得

本文发布于:2023-06-13 21:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1410155.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:心得   electron   vue

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!