Open Nastras opened 2 years ago
Looks like the install failed, please try it again
sudo npm i -g https://github.com/NorthernMan54/homebridge-cmd-television
If this gives any errors, please share the log
Hey thanks for the quick feedback. Yes there is an error when I enter the command:
Nastras@SHS-1:~ $ sudo npm i -g https://github.com/NorthernMan54/homebridge-cmd-television npm ERR! code 128 npm ERR! An unknown git error occurred npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/NorthernMan54/homebridge-cmd-television.git npm ERR! git@github.com: Permission denied (publickey). npm ERR! fatal: Konnte nicht vom Remote-Repository lesen. npm ERR! npm ERR! Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehen npm ERR! und das Repository existiert.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-01-31T13_54_41_874Z-debug-0.log
That looks like an issue with NPM, are you running an old or non-standard version of nodes/npm ?
No I think I use the normal versions. These plugins I have all in use without problems when installing.
How about this
sudo npm i -g --unsafe-perm https://github.com/NorthernMan54/homebridge-cmd-television
I have currently uninstalled your plugin. I had installed it with this and then the error from above occurred when starting: sudo npm install -g homebridge-cmd-television --unsafe-perm
Does not go either 😞 I also tried it directly as root with (sudo su).
With this I can install it but then I get the error: Error: Cannot find module 'request'
I’m stumped
Another trick is to change to the directory where the plugin is installed, sudo su, then just run ‘npm install’
I have now tried it on another Raspberry Pi 4. There also comes the installation error. Same npm and node version.
I’m stumped
Another trick is to change to the directory where the plugin is installed, sudo su, then just run ‘npm install’
Just tried. Also comes this installation error. It somehow looks like there is no permission to download the data.
Do you have the possibility to set something? Can you try to install it from a Pi if the error also occurs with you?
What version of npm and nodejs are you running?
I had already posted this above. Has probably gone under.
I am getting similar when trying a new install on a debian 11 VM running latest homebridge and nodejs v16.13.2 npm v8.1.2
`homebridge@HomeBridge:/var/lib/homebridge$ sudo npm i -g --unsafe-perm https://github.com/NorthernMan54/homebridge-cmd-television npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -2 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-01-31T23_11_43_530Z-debug.log homebridge@HomeBridge:/var/lib/homebridge$`
I just tested from my MacBook
sudo npm i -g --unsafe-perm https://github.com/NorthernMan54/homebridge-cmd-television
Password:
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
added 48 packages, and audited 49 packages in 3s
2 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Heisenberg:~ nm$ node -v
v16.13.2
Heisenberg:~ nm$ npm -v
8.1.2
Heisenberg:~ nm$
Something odd is going on here
Yes that is very strange 😅
Can you maybe update the plugin so that a new version is available.
Maybe it works then?
I get the same error on my raspberry pi. What works as a fallback is to run:
sudo npm install -g --save https://github.com/NorthernMan54/homebridge-cmd-television/tarball/master
(in other words, getting npm to just download and install the tarball rather than to go via normal git channels)
It seems like there's something slightly askew in the repository setup here that's redirecting it to ssh and trying to use the 'git' user. This doesn't happen with other homebridge (or other) npm packages.
Not really been sorted. I tried both the manual install specified for this plug-in, but had the above problem. I also tried 2 other versions of the same plug-in (why multiple versions from different people) and same problem even when installing via Homebridge UI. Errors when Homebridge starts and tries to load the plug-in.
I then used:-
npm i -g --unsafe-perm https://github.com/NorthernMan54/homebridge-cmd-television
I was actually logged in as the user used by Homebridge (as for all other plug-ins) and this time no major errors and the accessory appears in Homebridge.
Now to see if it works…
Yes it works and I can turn the ATC on and off. So something odd about the install that seems then incomplete so the plug-in won't run and hence doesn't work.
Get past that though and it does seem to work, although I still find it enormously dumb that Apple exclude the Apple TV from being actually usable in HomeKit despite being a HK hub.
Added this to Homebridge. Setup the config. Restarted Homebridge and got the same error:
[11/08/2022, 10:55:04 pm] ====================
[11/08/2022, 10:55:04 pm] ERROR LOADING PLUGIN homebridge-cmd-television:
[11/08/2022, 10:55:04 pm] Error: Cannot find module 'request'
Require stack:
- C:\Users\dines\AppData\Roaming\npm\node_modules\homebridge-cmd-television\index.js
- C:\Users\dines\AppData\Roaming\npm\node_modules\homebridge\lib\plugin.js
- C:\Users\dines\AppData\Roaming\npm\node_modules\homebridge\lib\pluginManager.js
- C:\Users\dines\AppData\Roaming\npm\node_modules\homebridge\lib\server.js
- C:\Users\dines\AppData\Roaming\npm\node_modules\homebridge\lib\cli.js
- C:\Users\dines\AppData\Roaming\npm\node_modules\homebridge\bin\homebridge
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\dines\AppData\Roaming\npm\node_modules\homebridge-cmd-television\index.js:1:15)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
[11/08/2022, 10:55:04 pm] ====================
npm i -g --unsafe-perm https://github.com/NorthernMan54/homebridge-cmd-television does not work for me either:
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dines\AppData\Local\npm-cache\_logs\2022-08-11T15_00_32_782Z-debug-0.log
As mentioned here the problem might be a problem with an incorrect installation of node.js. Try
npm install request --save
That worked for me.
Hello @NorthernMan54,
I would like to use your plugin. Thanks for your work!
Unfortunately I run into an error when I set it up your plugin and I can't figure out why. It looks like something is missing from the plugin? I have reinstalled it several times.
Attached is an excerpt from the log and my config.json.
I hope you can help me further? Thank you!
e further?