planetk / homebridge-netatmo

This is a homebridge plugin for several netatmo devices
Apache License 2.0
108 stars 24 forks source link

SyntaxError: Unexpected identifier #14

Closed samj closed 8 years ago

samj commented 8 years ago

I'm getting the following error with homebridge 0.3.4 on Linux raspberrypi 4.4.13-v7+ #894 SMP Mon Jun 13 13:13:27 BST 2016 armv7l GNU/Linux

/usr/lib/node_modules/homebridge-netatmo/index.js:261
      for (var device of devices) {
                      ^^
[Sun Jul 10 2016 01:16:19 GMT+1000 (AEST)] ====================
[Sun Jul 10 2016 01:16:19 GMT+1000 (AEST)] ERROR LOADING PLUGIN homebridge-netatmo:
[Sun Jul 10 2016 01:16:19 GMT+1000 (AEST)] SyntaxError: Unexpected identifier
    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 Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:65:22)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:112:14)
    at Array.forEach (native)
    at Server._loadPlugins (/usr/lib/node_modules/homebridge/lib/server.js:108:22)
[Sun Jul 10 2016 01:16:19 GMT+1000 (AEST)] ====================
retinoic commented 8 years ago

I have the same error when attempting to run homebridge w/ this plugin installed.

savealive commented 8 years ago

Hi, I experience the same issue on Centos7: [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] ---

/usr/lib/node_modules/homebridge-netatmo/index.js:261 for (var device of devices) { ^^ [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] ==================== [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] ERROR LOADING PLUGIN homebridge-netatmo: [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] SyntaxError: Unexpected identifier 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 Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:65:22) at Server. (/usr/lib/node_modules/homebridge/lib/server.js:112:14) at Array.forEach (native) at Server._loadPlugins (/usr/lib/node_modules/homebridge/lib/server.js:108:22) [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] ==================== [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] Loaded config.json with 1 accessories and 1 platforms. [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] --- [Mon Jul 11 2016 05:14:08 GMT-0400 (EDT)] Loading 1 platforms... Error: The requested platform 'netatmo' was not registered by any plugin. at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:106:13) at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:263:45) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:71:36) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:456:26) 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 Function.Module.runMain (module.js:497:10)

planetk commented 8 years ago

The new modularized version should avoid this part of the ECMAScript 2015 (ES6) standard. SO should work on older implementations now.