electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.46k stars 1.71k forks source link

electron-vite compileToBytecode #8236

Closed wiryonolau closed 1 month ago

wiryonolau commented 1 month ago

Using electronuserland/builder:wine docker image runing from Debian 12 running electron-vite build, function compileToBytecode error

out/main/index.js                59.17 kB
node:events:495
      throw er; // Unhandled 'error' event
      ^

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:962:11)
    at Socket._write (node:net:974:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at file:///home/user/project/node_modules/electron-vite/dist/index.mjs:35:24
    at new Promise (<anonymous>)
    at compileToBytecode (file:///home/user/project/node_modules/electron-vite/dist/index.mjs:26:12)
    at file:///home/user/project/node_modules/electron-vite/dist/index.mjs:276:54
    at Array.map (<anonymous>)
    at Object.writeBundle (file:///home/user/project/node_modules/electron-vite/dist/index.mjs:258:39)
    at file:///home/user/project/node_modules/rollup/dist/es/shared/node-entry.js:19774:40
    at async Promise.all (index 0)
    at async PluginDriver.hookParallel (file:///home/user/project/node_modules/rollup/dist/es/shared/node-entry.js:19702:9)
    at async file:///home/user/project/node_modules/rollup/dist/es/shared/node-entry.js:20699:13
    at async catchUnfinishedHookActions (file:///home/user/project/node_modules/rollup/dist/es/shared/node-entry.js:20119:16)
    at async build (file:///home/user/project/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:67481:22)
    at async build (file:///home/user/project/node_modules/electron-vite/dist/chunks/lib-GB2q6SUI.mjs:26:13)
    at async CAC.<anonymous> (file:///home/user/project/node_modules/electron-vite/dist/cli.mjs:83:9)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Is there additional library need to be installed before running ?

wiryonolau commented 1 month ago

Any electron dependency import will cause error, most of my service file doesn't require it.

As long as I split this it works ok