Open Magna66 opened 9 months ago
The file is in on of the directories.. Do a search using 'find / -name certgen.js -print' ... else try this directory 'homebridge/node_modules/homebridge-cast/certgen.js'
While I could run it but the script is unable to find any Android TV devices..
Could this be a Node v20 issue?
This is because the file is in different location. For me it was in /var/lib/homebridge/node_modules/homebridge-cast/
moreover, after running the script and filling the name of the device in, I get error and process aborts. Here is the stack trace:
Searching for device...
# node[8017]: void node::cares_wrap::{anonymous}::GetAddrInfo(const v8::FunctionCallbackInfo<v8::Value>&) at ../src/cares_wrap.cc:1603
# Assertion failed: args[4]->IsUint32()
----- Native stack trace -----
----- JavaScript stack trace -----
1: getaddrinfo_0_11 (/var/lib/homebridge/node_modules/homebridge-cast/node_modules/mdns/lib/resolver_sequence_tasks.js:117:21)
2: /var/lib/homebridge/node_modules/homebridge-cast/node_modules/mdns/lib/resolver_sequence_tasks.js:153:7
3: getaddrinfo (/var/lib/homebridge/node_modules/homebridge-cast/node_modules/mdns/lib/resolver_sequence_tasks.js:152:14)
4: next (/var/lib/homebridge/node_modules/homebridge-cast/node_modules/mdns/lib/browser.js:109:21)
5: on_resolver_done (/var/lib/homebridge/node_modules/homebridge-cast/node_modules/mdns/lib/resolver_sequence_tasks.js:33:11)
6: MDNSService.self.watcher.callback (/var/lib/homebridge/node_modules/homebridge-cast/node_modules/mdns/lib/mdns_service.js:18:40)
Aborted
Every time I run this command node $(npm root -g)/homebridge-cast/certgen.js I get the following:
root@homebridge-vm:/var/lib/homebridge $ node $(npm root -g)/homebridge-cast/certgen.js node:internal/modules/cjs/loader:1147 throw err; ^
Error: Cannot find module '/opt/homebridge/lib/node_modules/homebridge-cast/certgen.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 { code: 'MODULE_NOT_FOUND', requireStack: [] }
I am using Homebridge Virtual Machine, Windows 11 Hyper V. Node js Version v20.11.0.
thanks for your kind help.