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

Minimum Node.js LTS versions: 18.20, 20.10, or 22 #300

Closed
5 tasks
Jstrorma opened this issue Sep 22, 2024 · 4 comments
Closed
5 tasks

Minimum Node.js LTS versions: 18.20, 20.10, or 22 #300

Jstrorma opened this issue Sep 22, 2024 · 4 comments

Comments

@Jstrorma
Copy link

Description of Issue

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

SyntaxError: Unexpected token 'with'
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:118:18)
at callTranslator (node:internal/modules/esm/loader:273:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:30)

Node.js v20.9.0

Expected Behaviour

Open the settings

Steps to Reproduce

Open the settings

Plugin Version

1.0.4

Environment

  • OS: Synology NAS
  • Node:
  • Homebridge: 1.8.4

Home Connect Appliance(s)

No response

HomeKit App(s)

No response

Diagnostic Checks

Log File

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

SyntaxError: Unexpected token 'with'
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:118:18)
    at callTranslator (node:internal/modules/esm/loader:273:14)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:30)

Node.js v20.9.0

Configuration

{
    "platform": "HomeConnect",
    "name": "HomeConnect"
}

Additional Information

No response

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

You require a more recent version of Node.js.

On the Node 20 branch you require at least 20.10.0 for nodejs/node#50140.

@Jstrorma
Copy link
Author

Ok, that sucks. DSM only supports 20.9.0-1003 for now and I can't update the node.js from within HomeBridge using the hb-service command.

@thoukydides thoukydides removed the bug Something isn't working label Sep 23, 2024
@thoukydides thoukydides changed the title Cannot open settings Minimum Node.js LTS versions: 18.20, 20.10, or 22 Sep 23, 2024
@thoukydides
Copy link
Owner

In that case you will need to use v1.0.3 or earlier of this plugin until Synology release an up-to-date version of Node.js. This plugin supports all Node.js LTS branches (18, 20, and the upcoming 22)… but does require a relatively recent version on each branch (at least 18.20.0 or 20.10.0).

This is due to a breaking change in Node.js 22 that was backported to the other LTS branches. Version v1.0.4 was updated for that change to fix #298.

You won’t be missing any new functionality in v1.0.4; the only change (other than updated dependencies) is the Node.js 22 compatibility. I don’t currently have any other enhancements planned until Apple update HAP (with the promised robot vacuum cleaner support).

@thoukydides
Copy link
Owner

v1.0.5 should restore compatibility with Node.js 20.9.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants