naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
314 stars 63 forks source link

error loading : async discoverAsync...syntax error: unexpected identifier etc. #76

Closed jngothia closed 4 years ago

jngothia commented 4 years ago

Hello,

Recently switched from a different plugin which could only use the no-longer-free API from wunderground, but I'm having trouble loading the weather-plus plugin (with darksky). My log info is below, any help or ideas to try would be greatly appreciated!

/Users/jngothia/.npm-packages/lib/node_modules/homebridge-weather-plus/node_modules/googleapis/build/src/googleapis.js:81 async discoverAsync(url) { ^^^^^^^^^^^^^ SyntaxError: Unexpected identifier at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-weather-plus/node_modules/googleapis/build/src/index.js:19:22) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/Users/jngothia/.npm-packages/lib/node_modules/homebridge-weather-plus/node_modules/fakegato-history/lib/googleDrive.js:7:18) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

doubleohkevin commented 4 years ago

+1. Having essentially the same issue, except my log file isn't exactly the same.

naofireblade commented 4 years ago

@jngothia @doubleohkevin could you provide your config please?

jngothia commented 4 years ago

Thanks Nao, attached is my config.json where I got the issue above. I'm running homebridge on an old Macintosh.

naofireblade commented 4 years ago

Thanks. I deleted your config file, because it contained your api key. Your weather config worked for me. Could you please check what version of node js you are running node -v? If its older then v12.6.3 (latest LTS version), could you update and try again please?

jngothia commented 4 years ago

Thanks so much for responding Nao! Updating worked like a charm. Kicking myself for not investigating it on my own. Keep up the great work! I suppose I'll leave the issue open for doubleohkevin's benefit or leave it to your discretion to close.