peterhsieh / homebridge-ismartgate-light

MIT License
0 stars 1 forks source link

Published package on npm is not using config hostname #9

Open jasonkarns opened 1 month ago

jasonkarns commented 1 month ago

Describe The Bug:

Error trying to connect to ismartgate hub. Using incorrect hostname.

To Reproduce:

Installed package version 1.0.2

Grep dist and see axios network calls all have hardcoded url: http://ismartgate.home/...

Expected behavior:

Expect built package to be using the hostname configured via plugin UI.

Logs:

Error: getaddrinfo ENOTFOUND ismartgate.home
    at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'ismartgate.home',
  config: {
    url: 'http://ismartgate.home/index.php?op=config#light-val',```

**Plugin Config:**

```json
Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

Also worth noting that latest version of this repo da54cda won't even build. (npm run build hits 6 TS errors on node v22.9.0) (also aside: wondering why this is using build custom script instead of prepare hook script which would allow installing from git)

matbe81 commented 6 days ago

Same issue on 1.0.2. Reverted to version 1.0.1 and 1.0.0 which has same issue.