Estou obtendo o seguinte erro ao usar o electron com o modulo do serialport
Uncaught Error: Could not locate the bindings file. Tried:
→ C:\www\conferencia\node_modules\@serialport\bindings\build\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\build\Debug\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\build\Release\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\out\Debug\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\Debug\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\out\Release\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\Release\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\build\default\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\compiled\10.11.0\win32\x64\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\addon-build\release\install-root\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\addon-build\debug\install-root\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\addon-build\default\install-root\bindings.node
→ C:\www\conferencia\node_modules\@serialport\bindings\lib\binding\node-v69-win32-x64\bindings.node
at bindings (C:\www\conferencia\node_modules\bindings\bindings.js:126)
at Object.<anonymous> (C:\www\conferencia\node_modules\@serialport\bindings\lib\win32.js:1)
at Object.<anonymous> (C:\www\conferencia\node_modules\@serialport\bindings\lib\win32.js:125)
at Module._compile (internal/modules/cjs/loader.js:693)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:704)
at Module.load (internal/modules/cjs/loader.js:602)
at tryModuleLoad (internal/modules/cjs/loader.js:541)
at Function.Module._load (internal/modules/cjs/loader.js:533)
at Module.require (internal/modules/cjs/loader.js:640)
at require (internal/modules/cjs/helpers.js:20)
procurei no github e afins não achei a solução, alguém consegue me ajudar?
o código é o seguinte :
const SerialPort = require('serialport')
SerialPort.list().then(lista => {
let porta = new SerialPort(lista[0].path,
{
baudRate: 2400,
parity: "even",
dataBits: 7
}
).setEncoding('utf8');
let buffer = new Buffer.alloc(10);
buffer[0] = 0x05;
buffer[1] = 0xAA;
buffer[2] = 0x55;
buffer[3] = 0xFA;
buffer[4] = 0x00;
buffer[5] = 0x56;
buffer[6] = 0x00;
buffer[7] = 0x03;
buffer[8] = 0x9E;
buffer[9] = 0x00;
porta.write(buffer);
porta.on("data", linha => linha);
});