mdopp / simple-sonoff-server

Emulates the original sonoff-cloud-servers within your local network.
BSD 2-Clause "Simplified" License
144 stars 47 forks source link

Cannot run sonoff.server #11

Closed NiekN closed 6 years ago

NiekN commented 6 years ago

pi@raspberrypi:~/Sonoff/simple-sonoff-server $ node sonoff.server.js

/home/pi/Sonoff/simple-sonoff-server/sonoff.server.module.js:26 state.getDeviceById = (deviceId) => { ^ SyntaxError: Unexpected token > 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. (/home/pi/Sonoff/simple-sonoff-server/sonoff.server.js:3:22) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

is there something what im doing wrong?

mdopp commented 6 years ago

Which node version are you using?

mdopp commented 6 years ago

The reason I am asking is that this syntax is only since version 4.0 or later supported

NiekN commented 6 years ago

pi@raspberrypi:~ $ node --version v0.10.29 pi@raspberrypi:~ $

mdopp commented 6 years ago

Yeap. You have to upgrade or use the docker version.

NiekN commented 6 years ago

i used: $ sudo n stable and after reboot v9.4.0

and than it is working ., Thanks for help Now i can go to the next steps