electron-builder
electron-builder copied to clipboard
building windows app on centos linux, error : write EPIPE
os: linux centos target: windows exe
repo: https://github.com/electron-userland/electron-webpack-quick-start
demo can not build exe on centos linux
error:
• downloading url=https://github.com/electron/electron/releases/download/v8.2.0/electron-v8.2.0-win32-x64.zip size=71 MB parts=8
• downloaded url=https://github.com/electron/electron/releases/download/v8.2.0/electron-v8.2.0-win32-x64.zip duration=34.806s
• file source doesn't exist from=/root/test/electron-webpack-quick-start/static
• default Electron icon is used reason=application icon is not set
• building target=nsis file=dist/electron-webpack-quick-start Setup 0.0.0.exe archs=x64 oneClick=true perMachine=false
Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:156:25)
at writeGeneric (internal/stream_base_commons.js:147:3)
at Socket._writeGeneric (net.js:785:11)
at Socket._write (net.js:797:8)
at writeOrBuffer (_stream_writable.js:352:12)
at Socket.Writable.write (_stream_writable.js:303:10)
at Socket.Writable.end (_stream_writable.js:567:10)
at Socket.end (net.js:591:31)
at /root/test/electron-webpack-quick-start/node_modules/builder-util/src/util.ts:197:26
at new Promise (
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
someboby has solution? pls
Have same issue.
same
same
I just got this same error after not changing any code in CI when it previously ran without an issue.
centos7 electron 12.1.2 electron-builder 22.11.5
Has anyone solved it?
Has anyone solved it?
@sujiewen 有2个办法 1. 使用docker容器来构建 2. 更换nsis版本 我都用过 最后倾向于使用docker容器来构建,可以跨端
Has anyone solved it?
@sujiewen 有2个办法 1. 使用docker容器来构建 2. 更换nsis版本 我都用过 最后倾向于使用docker容器来构建,可以跨端 能把方法详细说明下吗?谢谢
I encountered the same problem, and finally found that it was because the .cache/electron-builder/nsis/nsis-3.0.4.1/linux/makensis file did not have execute permission, and chmod with execute permission was OK.
我这边发现是makensis执行缺少部分依赖(去对应平台的makensis执行文件目录,命令行手动执行一下会有提示),安装一下就好了。
我这边发现是makensis执行缺少部分依赖(去对应平台的makensis执行文件目录,命令行手动执行一下会有提示),安装一下就好了。
确实是少了两个依赖
./makensis: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./makensis)
./makensis: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./makensis)
Has anyone solved it?I just got this same error .
Commented by @yuzhou721:
有2个办法:1)使用 Docker 容器来构建
There're 2 solutions: 1) Use Docker Containers for building action
我确实使用了 Docker Desktop for Windows (WSL2 Backend) 来进行构建,但依旧出现相同问题。
I DOES use Docker Desktop for Windows with WSL2 backend for building, but the same problem still occurs ...
Environments
- Microsoft Windows 11 Professional 22H2
- Docker Desktop for Windows (WSL2 backend)
- Version 4.13.1 (90346)
- Engine: 20.10.20
- Compose: v2.12.1
- Credential Helper: v0.7.0
- Kubernates: v1.25.2
- Snyk: v1.1025.0
- Microsoft Visual Studio Code v1.73.1 (system setup)
- Dev Containers v0.264.0
Steps to reproduce
-
Launch the build environment with Docker Container ...
- Pull the image
electronuserland/builder:16-wine
from DockerHub. - Start a brand-new container with that image in Docker Desktop GUI.
- Click "Run" and expand "Optional Settings". For convince, we name it as
motrix
. - DO NOT configure any other thing!
- Click "Run" and expand "Optional Settings". For convince, we name it as
- Pull the image
-
Launch VSCode and attach the environment ...
- Click the buttom-left and choose "Attach to Running Container ...", a new window will automatically launched and attached to our
motrix
container. - At the welcome page click "Clone Git Repository ...", you should clone agalwood/Motrix under
/root
and there will be a/root/Motrix
folder after cloning.
- Click the buttom-left and choose "Attach to Running Container ...", a new window will automatically launched and attached to our
-
Upgrade Aria2 ...
- Run
apt update && apt install -y p7zip-full
for/usr/bin/7z
, it will be used the next step. - Download aria2-1.36.0-win-64bit-build2.7z with
wget
to any available folder outside/root/Motrix
and extract it with7z x aria2-1.36.0-win-64bit-build2.7z
. - Replace
extra/win32/engine/aria2c.exe
witharia2-1.36.0-win-64bit-build2/aria2c.exe
.
- Run
-
Build artifacts by running
yarn && yarn build:github && yarn run electron-build -w --x64
! -
Wait a moment, an error will occur when building "release-able files" (
*.exe
,*.msi
, etc.).
Error logs
Following errors occured when yarn run electron-build -w --x64
. There's no error in previous steps.
Log contents
root@192d286b808c:~/Motrix# yarn run electron-builder -w --x64
yarn run v1.22.19
$ /root/Motrix/node_modules/.bin/electron-builder -w --x64
• electron-builder version=22.11.7 os=5.15.74.2-microsoft-standard-WSL2
• loaded configuration file=package.json ("build" field)
• writing effective config file=release/builder-effective-config.yaml
• packaging platform=win32 arch=x64 electron=11.4.9 appOutDir=release/win-unpacked
after build; disable sandbox
• building target=zip arch=x64 file=release/Motrix-1.6.11-win.zip
• packaging platform=win32 arch=ia32 electron=11.4.9 appOutDir=release/win-ia32-unpacked
after build; disable sandbox
• building target=zip arch=ia32 file=release/Motrix-1.6.11-ia32-win.zip
• building target=nsis file=release/Motrix Setup 1.6.11.exe archs=x64, ia32 oneClick=false perMachine=false
• building target=portable file=release/Motrix 1.6.11.exe archs=x64, ia32
Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:160:15)
at writeGeneric (node:internal/stream_base_commons:151:3)
at Socket._writeGeneric (node:net:874:11)
at Socket._write (node:net:886:8)
at writeOrBuffer (node:internal/streams/writable:391:12)
at _write (node:internal/streams/writable:332:10)
at Socket.Writable.end (node:internal/streams/writable:611:17)
at Socket.end (node:net:655:31)
at /root/Motrix/node_modules/builder-util/src/util.ts:204:25
at new Promise (<anonymous>)
at Object.spawnAndWrite (/root/Motrix/node_modules/builder-util/src/util.ts:183:10)
at NsisTarget.executeMakensis (/root/Motrix/node_modules/app-builder-lib/src/targets/nsis/NsisTarget.ts:576:11)
at NsisTarget.buildInstaller (/root/Motrix/node_modules/app-builder-lib/src/targets/nsis/NsisTarget.ts:302:5)
at NsisTarget.finishBuild (/root/Motrix/node_modules/app-builder-lib/src/targets/nsis/NsisTarget.ts:129:9)
at async Promise.all (index 8)
at AsyncTaskManager.awaitTasks (/root/Motrix/node_modules/builder-util/src/asyncTaskManager.ts:65:25)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
我这边发现是makensis执行缺少部分依赖(去对应平台的makensis执行文件目录,命令行手动执行一下会有提示),安装一下就好了。
确实是少了两个依赖
./makensis: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./makensis) ./makensis: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./makensis)
我也有同样的问题,但是我更新包,但是没有用。。 @zhaihongbin @dddreee