shokai / node-arduino-firmata

Arduino Firmata protocol implementation on Node.js
https://npmjs.org/package/arduino-firmata
MIT License
51 stars 20 forks source link

TypeError: SerialPort is not a constructor #22

Open vvzen opened 6 years ago

vvzen commented 6 years ago

While trying the example code, I get this:

/blablabla/node_modules/arduino-firmata/lib/arduino-firmata.js:129
      this.serialport = new SerialPort(this.serialport_name, opts);
                        ^

TypeError: SerialPort is not a constructor
    at ArduinoFirmata.module.exports.ArduinoFirmata.connect /blablabla/node_modules/arduino-firmata/lib/arduino-firmata.js:129:25)
    at Object.<anonymous> (/blablabla/app.js:5:9)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
WazzaMo commented 6 years ago

@shokai @NielZeeman This problem has been fixed in a fork of this project [https://github.com/NielZeeman/node-arduino-firmata]() !!

The problem is that this main code base as fallen behind.

I don't know why @shokai doesn't take a pull request from NielZeeman to bring it up-to-date?