nodeJS emilsedgh / modem library sp.SerialPort不是构造函数

时间:2017-10-13 17:43:23

标签: node.js constructor serial-port gsm modem

我试图运行示例代码https://github.com/emilsedgh/modem/blob/master/examples/send_sms.js,我得到:

node_modules/modem/lib/modem.js:82
    modem.port = new sp.SerialPort(device, {
                 ^
TypeError: sp.SerialPort is not a constructor
at EventEmitter.modem.open (node_modules/modem/lib/modem.js:82:22)
at Object.<anonymous> (node_modules/modem/examples/send_sms.js:15:7)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:607:3

0 个答案:

没有答案