Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't configure the plugin. #298

Closed
1 of 5 tasks
mdecaro opened this issue Sep 16, 2024 · 5 comments
Closed
1 of 5 tasks

Can't configure the plugin. #298

mdecaro opened this issue Sep 16, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mdecaro
Copy link

mdecaro commented Sep 16, 2024

Description of Issue

Can't configure the plugin. I tried using the UI, also tried manually editing the JSON.
ERROR LOADING PLUGIN homebridge-homeconnect SyntaxError Unexpected identifier assert

Expected Behaviour

Get to step where I get QR code for child bridge

Steps to Reproduce

Used UI or manual install - no luck

Plugin Version

1.0.3

Environment

  • OS: macOS 14.6.1
  • Node: 22.8.0
  • Homebridge: 1.8.3 and 1.8.4

Home Connect Appliance(s)

Bosch frig

HomeKit App(s)

Apple Home

Diagnostic Checks

Log File

[homebridge-homeconnect] file:///opt/homebrew/lib/node_modules/homebridge-homeconnect/dist/settings.js:3
import PACKAGE from '../package.json' assert { type: 'json' };
                                      ^^^^^^

SyntaxError: Unexpected identifier 'assert'
    at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
    at callTranslator (node:internal/modules/esm/loader:436:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:442:30)

Node.js v22.8.0

Configuration

Empty on new install for that plugin
Tried manually installing with client. - no luck

Additional Information

No response

@mdecaro mdecaro added the bug Something isn't working label Sep 16, 2024
@thoukydides
Copy link
Owner

I suspect that this is due to a change in Node.js 22, probably nodejs/node#51622. It looks like it should be a simple fix to adopt the new syntax for Node.js 22, and that new syntax appears to have been backported to Node.js 18 and 20… but I will need to run some tests to be sure, and will probably need to increase the minimum compatible version numbers on those branches, which will require some users to upgrade.

@mdecaro
Copy link
Author

mdecaro commented Sep 16, 2024 via email

@mdecaro
Copy link
Author

mdecaro commented Sep 16, 2024 via email

@thoukydides
Copy link
Owner

Homebridge officially only supports Node.js LTS releases - which are currently 18 and 20 - so downgrading is a good workaround.

However, Node.js 22 is expected to become an LTS release next month (October 2024) so I do need to fix this.

It looks like the fix will require a minimum of Node.js 18.20.0.
Node.js 19 (which is not an LTS release) will not be supported.

@thoukydides
Copy link
Owner

Should be fixed in v1.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants