I'm trying to connect aws-iot with intel galileo gen2 and following the given link https://www.hackster.io/vijayenthiran/control-things-connected-to-intel-galileo-gen-2-via-aws-iot-46046f. When running the code connecttoaws.js provided in that link, the following error occurs. I couldn't find any solution, can anyone please help me to fix them..

[email protected]:~/aws-iot# node connectaws.js

/home/root/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/server.js:7

class Server extends WebSocketServer{

^^^^^

SyntaxError: Unexpected reserved word

at Module._compile (module.js:439:25)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

at Module.require (module.js:364:17)

at require (module.js:380:17)

at Object.<anonymous> (/home/root/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/index.js:2:14)

at Module._compile (module.js:456:26)

at Object.Module._extensions..js (module.js:474:10)

at Module.load (module.js:356:32)

[email protected]:~/aws-iot#

0 Answers