You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execute the following (on Mac or Docker (electronuserland/builder:wine) container):
npm i
npm run clean
npm run dist:win
What happens?
The build seems to work:
• electron-builder version=23.3.3 os=21.5.0
• loaded configuration file=package.json ("build" field)
• writing effective config file=builder-output/builder-effective-config.yaml
• rebuilding native dependencies dependencies=@serialport/bindings-cpp@10.6.3 platform=win32 arch=x64
• packaging platform=win32 arch=x64 electron=17.4.11 appOutDir=builder-output/win-unpacked
• default Electron icon is used reason=application icon is not set
• building target=nsis file=builder-output/SerialTest Setup 1.0.2.exe archs=x64 oneClick=true perMachine=false
• building block map blockMapFile=builder-output/SerialTest Setup 1.0.2.exe.blockmap
But when the app is run on Windows, I get the following error in the dev tools:
Uncaught Error: \\?\C:\Users\j\AppData\Local\Temp\643069be-b2d9-4e55-af7e-95fffc6f6399.tmp.node is not a valid Win32 application.
\\?\C:\Users\j\AppData\Local\Temp\643069be-b2d9-4e55-af7e-95fffc6f6399.tmp.node
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Function.o._load (node:electron/js2c/renderer_init:33:356)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at load (C:\Users\j\AppData\Local\Programs\electron-serialport\resources\app.asar\node_modules\node-gyp-build\index.js:22:10)
I'm sure I'm missing a step or just don't understand how to use/configure the prebuilt versions or how the Node-API versions are supposed to work.
Everything was working in our CI env. (Docker build) before updating to Serialport >= 10.
What should have happened?
We should get a working application as before updating Serialport to version 10+.
Additional information
I tried this with a rainbow of node versions / electron versions / serial port versions all resulting in the same error.
I guess native dependancies are being built for the wrong platform rather than the prebuilt ones being used. There is an autoDetect function which is supposed to supply the correct bindings but somehow it does not work?
Any help is super appreciated.
Cheers.
The text was updated successfully, but these errors were encountered:
SerialPort Version
10.4.0
Node Version
16.14.1
Electron Version
20.0.2
Platform
Mac / Docker image based on electronuserland/builder:wine
Architecture
x64
Hardware or chipset of serialport
N/A
What steps will reproduce the bug?
Clone the serial port demo project:
Add electron-builder:
Add electron-builder config to package.json (test config below):
Add the following scripts to package,json:
Execute the following (on Mac or Docker (electronuserland/builder:wine) container):
npm i
npm run clean
npm run dist:win
What happens?
The build seems to work:
But when the app is run on Windows, I get the following error in the dev tools:
I'm sure I'm missing a step or just don't understand how to use/configure the prebuilt versions or how the Node-API versions are supposed to work.
Everything was working in our CI env. (Docker build) before updating to Serialport >= 10.
What should have happened?
We should get a working application as before updating Serialport to version 10+.
Additional information
I tried this with a rainbow of node versions / electron versions / serial port versions all resulting in the same error.
Back in the pre Node-API days this line:
was always followed by:
I guess native dependancies are being built for the wrong platform rather than the prebuilt ones being used. There is an autoDetect function which is supposed to supply the correct bindings but somehow it does not work?
Any help is super appreciated.
Cheers.
The text was updated successfully, but these errors were encountered: