Serial port in electron


#1

I am using Node v0.12.7, Electron v0.31.2. npm v2.11.3.
I installed serialport using npm. It works fine in Node but not in electron. In electron serialport module cannot be found error message shown. Is there any work around for serialport in the latest versions of electron and node?


#2

Likely you have to compile the serial module to be used in Electron in a separate step (as Electron uses a different node.js version). Checkout the Electron documentation on how to build native module extensions for further information: http://electron.atom.io/docs/v0.31.0/tutorial/using-native-node-modules/.