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
Setup an Vite Typescript Electron project, install serialport and Firmata using npm, run npm run start which runs
electron-forge start
What happens?
While preparing the application, the native dependencies are being rebuilt for the electron-internal Node.js version. This fails because there apparently are syntax errors in the "@serialport" dependency in Firmata.
I tried Node 18 - 22 and the problem occurred every single time.
The only way I was able to fix it was by manually adding the following to node_modules\firmata\node_modules\@serialport\bindings\binding.gyp
SerialPort Version
v12.0.0
Node Version
v20.18.1
Electron Version
v33.2.0
Platform
Microsoft Windows NT 10.0.19045.0 x64
Architecture
x64
Hardware or chipset of serialport
No response
What steps will reproduce the bug?
Setup an Vite Typescript Electron project, install serialport and Firmata using npm, run
npm run start
which runselectron-forge start
What happens?
While preparing the application, the native dependencies are being rebuilt for the electron-internal Node.js version. This fails because there apparently are syntax errors in the "@serialport" dependency in Firmata.
The output is similar to this issue in the
nan
project.I tried Node 18 - 22 and the problem occurred every single time.
The only way I was able to fix it was by manually adding the following to
node_modules\firmata\node_modules\@serialport\bindings\binding.gyp
so that it looks like this:
What should have happened?
The Firmata / SerialPort dependency should just rebuild for the Electron Node.js version like every other native dependency.
Additional information
Another project fixed this in their
bindings.gyp
like this (see here), that's why I thought it might fix it for serialport as well.The text was updated successfully, but these errors were encountered: