我正在尝试将aws-iot与genile galileo gen2连接,并遵循给定的链接https://www.hackster.io/vijayenthiran/control-things-connected-to-intel-galileo-gen-2-via-aws-iot-46046f。运行该链接中提供的代码connecttoaws.js时,发生以下错误。我找不到任何解决方案,有人可以帮我解决这些问题。
root @ galileo:〜/ aws-iot#节点connectaws.js
/home/root/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/server.js:7
类服务器扩展了WebSocketServer {
^^^^^
SyntaxError:意外的保留字
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)
root @ galileo:〜/ aws-iot#