Closed rafalbrz71 closed 5 years ago
Hello, just realized that I did not specify the version of node that is required and if the version is too new the serialport package will not work. Try downgrading your node version to v5.12 and the serialport package should work
Maybe you can help with this:
pi@raspberrypi:~/consultDash $ npm start
/home/pi/consultDash/server.js:10 var sp = new SerialPort('/dev/ttyUSB0', { baudrate: 9600 }); ^
TypeError: SerialPort is not a constructor at Object. (/home/pi/consultDash/server.js:10:12)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-world@ start:
node server.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the hello-world@ start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2018-09-13T09_50_01_987Z-debug.log pi@raspberrypi:~/consultDash $