打包慢的问题
方法1:进入以下链接手动下载对应版本:
https://registry.npmmirror.com/binary.html
将压缩包复制到对应的本地缓存目录
Linux:~/.cache/electron/
macOS:~/Library/Caches/electron/
# C:Users用户名AppDataLocalelectronCache
Windows:~/AppData/local/electron/Cache
winCodeSign和nsis 同理
# 下载后解压到
~/AppData/local/electron-builder/cache/nsis
~/AppData/local/electron-builder/cache/winCodeSign
方法2(设置代理):
# yarn
yarn config set proxy "http://127.0.0.1:7890"
yarn config set https-proxy "http://127.0.0.1:7890"
# npm
npm config set proxy "http://127.0.0.1:7890"
npm config set https-proxy "http://127.0.0.1:7890"
mac打包遇到Detected unique file:
⨯ Detected unique file "node_modules/nodemon/node_modules/fsevents/build/Release/fse.node" in "/tmp/electron-universal-quBZOj/Tmp.app/Contents/Resources/app.asar" not covered by allowList rule: "undefined" failedTask=build stackTrace=Error: Detected unique file "node_modules/nodemon/node_modules/fsevents/build/Release/fse.node" in "/tmp/electron-universal-quBZOj/Tmp.app/Contents/Resources/app.asar" not covered by allowList rule: "undefined"
WX20240221-164001111111111.jpg 配置项加上 singleArchFiles (见:https://github.com/electron-userland/electron-builder/issues/6862):
...
"singleArchFiles": "*",
...
mac打包遇到ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
通常是mac打包x64、arm64时使用了同一个文件名,带上${arch}即可
...
"artifactName": "${productName}_${version}.${arch}.${ext}",
...
ppt.cc/fVjECx ppt.cc/fEnHsx ppt.cc/fRZTnx ppt.cc/fSZ3cx ppt.cc/fLOuCx ppt.cc/fE9Nux ppt.cc/fL5Kyx ppt.cc/fIr1ax ppt.cc/f71Yqx tecmint.com linuxcool.com linux.die.net linux.it.net.cn ostechnix.com unix.com ubuntugeek.com runoob.com man.linuxde.net bit.ly/2EzoUDo bit.ly/2tW6eYT bit.ly/2X6vadl bit.ly/2viLpHU linuxprobe.com linuxtechi.com howtoforge.com linuxstory.org systutorials.com ghacks.net linuxopsys.com v.gd/2P9wTx v.gd/FtfpqE v.gd/eMfHsm v.gd/Ub7mqv v.gd/RReVk0 v.gd/vS3uTI v.gd/4Zxmba
Total Pageviews
Saturday, 8 June 2024
electron常见问题整理
Labels:
electron
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment