colinbendell / homebridge-blink-for-home

Blink For Home Camera Homebridge plugin
MIT License
88 stars 27 forks source link

Node 12 doesn't support ES2020 Conditional Chaining #56

Closed thomaspirard closed 3 years ago

thomaspirard commented 3 years ago

Hello guys, My plugin stopped working since yesterday. This is my log grabilla g14924 Thnks for helping

colinbendell commented 3 years ago

Can you tell me what version of homebridge you are running?

thomaspirard commented 3 years ago

Hello, I use 1.3.0 version

kevanwm commented 3 years ago

Also seeing this issue in homebridge-blink-for-home v3.7.1 & Homebridge 1.3.0 (I was seeing it in Homebridge v1.2.5, as well)

[2/22/2021, 7:41:22 PM] ====================
[2/22/2021, 7:41:22 PM] ERROR LOADING PLUGIN homebridge-blink-for-home:
[2/22/2021, 7:41:22 PM] /usr/lib/node_modules/homebridge-blink-for-home/src/inifile.js:10
            const [name, ...value] = line?.trim()?.split(/=/);
                                          ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-blink-for-home/src/blink-api.js:6:17)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[2/22/2021, 7:41:22 PM] ====================
thomaspirard commented 3 years ago

Also seeing this issue in homebridge-blink-for-home v3.7.1 & Homebridge 1.3.0 (I was seeing it in Homebridge v1.2.5, as well)

[2/22/2021, 7:41:22 PM] ====================
[2/22/2021, 7:41:22 PM] ERROR LOADING PLUGIN homebridge-blink-for-home:
[2/22/2021, 7:41:22 PM] /usr/lib/node_modules/homebridge-blink-for-home/src/inifile.js:10
            const [name, ...value] = line?.trim()?.split(/=/);
                                          ^

SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-blink-for-home/src/blink-api.js:6:17)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[2/22/2021, 7:41:22 PM] ====================

I'm sad because the plugin worked really good for 3 weeks (I have homebridge for 4 weeks)

colinbendell commented 3 years ago

Ugh. Yea, that's ES2020 syntax that's only supported on Node 14+. I'll revert to Node 12 syntax support.

colinbendell commented 3 years ago

I have reverted to Node 12 LTS compatible syntax (ES2019).

Shipped in v3.7.2