-
Notifications
You must be signed in to change notification settings - Fork 26
Description
/home/hostmit/orange-security/nodejs/test.js:7
modem.error('error', function() {
^
TypeError: modem.error is not a function
at Object. (/home/hostmit/orange-security/nodejs/test.js:7:7)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)
Well, when I comment out .error, getting
/home/hostmit/orange-security/nodejs/node_modules/simcom/lib/modem.js:42
this.port = new serialport.SerialPort(this.device, {
^
TypeError: serialport.SerialPort is not a constructor
at Modem.open (/home/hostmit/orange-security/nodejs/node_modules/simcom/lib/modem.js:42:19)
at Object. (/home/hostmit/orange-security/nodejs/test.js:11:7)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:266:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)