madchicken/homebridge-zigbee-nt

Cannot find module 'uri-js'

davidXire opened this issue · 12 comments

Hello,

When I installed the new version, I got this error stack when HB reboot

`====================
[28/04/2022, 09:40:39] ERROR LOADING PLUGIN homebridge-zigbee-nt:
[28/04/2022, 09:40:39] Error: Cannot find module 'uri-js'
Require stack:

  • /usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman-converters/lib/ota/zigbeeOTA.js
  • /usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman-converters/lib/ota/securifi.js
  • /usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman-converters/lib/ota/index.js
  • /usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman-converters/devices/danfoss.js
  • /usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman-converters/index.js
  • /usr/local/lib/node_modules/homebridge-zigbee-nt/dist/registry.js
  • /usr/local/lib/node_modules/homebridge-zigbee-nt/dist/devices-registration.js
  • /usr/local/lib/node_modules/homebridge-zigbee-nt/dist/index.js
  • /usr/local/lib/node_modules/homebridge/lib/plugin.js
  • /usr/local/lib/node_modules/homebridge/lib/pluginManager.js
  • /usr/local/lib/node_modules/homebridge/lib/server.js
  • /usr/local/lib/node_modules/homebridge/lib/cli.js
  • /usr/local/lib/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
    at Function.Module._load (internal/modules/cjs/loader.js:745:27)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object. (/usr/local/lib/node_modules/homebridge-zigbee-nt/node_modules/zigbee-herdsman-converters/lib/ota/zigbeeOTA.js:5:13)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    [28/04/2022, 09:40:39] ====================
    [28/04/2022, 09:40:39] No plugin was found for the platform "ZigbeeHomebridgeNTPlatform" in your config.json. Please make sure the corresponding plugin is installed correctly.`

i have got the same problem.

Same here.
nothing seems to be working.
tried downgrade version. Still nothing. Any ideas??

It can be temporary fixed with manual installation of uri-js

sudo npm install -g uri-js

Hi, I've the same issue than [davidXire]. Manual installation of uri-js don't work.

Do you have any ideas ?
Thanks

Install previous one ? :)

It can be temporary fixed with manual installation of uri-js

sudo npm install -g uri-js

This worked for me, after I had already downgraded to node 12.22.12. Once I confirmed I was able to add the bridge to HomeKit, I upgraded to the latest LTS. Upon doing so, I got compatibility errors stating that the plugin was compiled using an older version of Node, so I removed the plugin, ran sudo npm install -g uri-js again under the latest Node LTS, and then reinstalled the plugin. I noticed this error in during install, but it doesn't seem to affect the plugin itself spinning up:

Screenshot at Jun 05 16-14-43

Afterwards, I was granted access to the child bridge QR code as expected. I wasn't able to add it yet, since I don't have a Zigbee dongle (as evidenced by the errors in the log), but that's coming next. ;)

Screenshot at Jun 05 16-16-51

Posting all this in case anyone runs into similar circumstances such as I did.

Hi, there,

Can someone give me its configuration (including Homebridge, Node.js) please? I need to find stability :) Thanks

I have the same problem. I tried to manually install as quoted above but this didn’t do the trick for me either. Thanks for your help!

Same problem! Manual install also didn't do the trick

@madchicken fixed the problem with the new update. Thank you very much !!!!