seikan / homebridge-mi-air-purifier

A Xiaomi Mi air purifier plugin for Homebridge.
Other
172 stars 65 forks source link

Unexpected token function, fail to loading plugin. #54

Open huangbinapple opened 6 years ago

huangbinapple commented 6 years ago

my node version is v6.14.3

[6/28/2018, 2:49:56 AM] ====================
[6/28/2018, 2:49:56 AM] ERROR LOADING PLUGIN homebridge-mi-air-purifier:
[6/28/2018, 2:49:56 AM] /usr/lib/node_modules/homebridge-mi-air-purifier/index.js:296
    getLockPhysicalControls: async function(callback) {
                                   ^^^^^^^^

SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Plugin.load (/usr/lib/node_modules/homebridge/lib/plugin.js:72:22)
[6/28/2018, 2:49:56 AM] ====================
Joeip12 commented 5 years ago

same problem here, please help.

screenshot 2018-11-15 at 5 58 26 pm