electron-builder: ASAR doesn't contain Serialport's dependency modules on Linux/Mac (works fine on Windows)
- Electron-Builder Version: v24.0.0-alpha.13
- Node Version: 18
- Electron Version: ^23.1.1
- Electron Type (current, beta, nightly): current
- Target: Linux and Mac (Windows works, only have issue with Mac and Linux)
Updated existing project to latest Electron, and latest prerelease Electron-builder Project Builds fine - using Github Actions CI (windows-latest, ubuntu-latest and macos-latest runners)
Installed Windows version works fine, but Mac and Linux - app doesn’t start, can’t find depencies’ submodules
https://openbuilds.com/threads/control-in-macos-linux-window-doesnt-open.20134/ relates
Require stack:
- /Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar.unpacked/node_modules/@serialport/bindings-cpp/dist/index.js
- /Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/node_modules/serialport/dist/serialport.js
- /Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/node_modules/serialport/dist/index.js
- /Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/index.js
-
at Module._resolveFilename (node:internal/modules/cjs/loader:1002:15)
at n._resolveFilename (node:electron/js2c/browser_init:2:109797)
at Module._load (node:internal/modules/cjs/loader:848:27)
at f._load (node:electron/js2c/asar_bundle:2:13330)
at Module.require (node:internal/modules/cjs/loader:1068:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar.unpacked/node_modules/@serialport/bindings-cpp/dist/index.js:22:33)
at Module._compile (node:internal/modules/cjs/loader:1174:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1229:10)
at Module.load (node:internal/modules/cjs/loader:1044:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar.unpacked/node_modules/@serialport/bindings-cpp/dist/index.js',
'/Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/node_modules/serialport/dist/serialport.js',
'/Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/node_modules/serialport/dist/index.js',
'/Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/index.js',
undefined
]
}
TypeError: Cannot read properties of undefined (reading 'address')
at Server.<anonymous> (/Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/index.js:99:41)
at Object.onceWrapper (node:events:627:28)
at Server.emit (node:events:525:35)
at emitListeningNT (node:net:1519:10)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
TypeError: Cannot read properties of undefined (reading 'address')
at Server.<anonymous> (/Applications/OpenBuildsCONTROL.app/Contents/Resources/app.asar/index.js:103:41)
at Object.onceWrapper (node:events:627:28)
at Server.emit (node:events:525:35)
at emitListeningNT (node:net:1519:10)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18
Did it only start in
alpha.13or does it exist in previous versions? Trying to git diff the release versions https://github.com/electron-userland/electron-builder/compare/v24.0.0-alpha.12...v24.0.0-alpha.13Re: the issue labels. I’ll see if I can override them. They currently are automated, and perhaps not accurately. (It was a test automation)