SteveCohen / homebridge-BOMgovau

Makes BOM.gov.au data available in your Homebridge(Homekit) setup
6 stars 1 forks source link

Update Dependencies #13

Closed mitch7391 closed 2 years ago

mitch7391 commented 2 years ago

Should fix #12.

mitch7391 commented 2 years ago

Hey @SteveCohen, how are we feeling about this one? I have not been able to re-install the plugin during all of this time and would be keen to get it back in my system :)

SteveCohen commented 2 years ago

Thanks Mitch, The change looks simple, but as you've not been able to install your fork on your own system successfully, I am reluctant to accept the PR. I'm unable to test it myself at the moment as I'm travelling over christmas. And once it's accepted I'll also need to push it to NPM -- again, something I can do when i'm home.

Will look at this again when I'm back at home in January. Thanks for investigating it and submitting the PR, in the meantime.

mitch7391 commented 2 years ago

No worries @SteveCohen, that is completely understandable and I would be a little hesitant myself with my own repo. I was hoping you were able to do a local test in the mean time; but if you are away on holidays then that makes complete sense! :) also sorry for rushing you.

I will see if I can work on why I cannot get my fork of your plugin to install on my RPi. As I said I made this exact same change for another plugin and had no issues installing a local copy to my RPi for testing. I had wondered if it has anything to do with the licence you have (I do not know much about these) or if it is something to do with the plugin identifier issue. NPM seem to be really vague with their errors... Something new for me to try and learn! Enjoy your holidays and time off :)

mitch7391 commented 2 years ago

If you are curious; the error I am facing while trying to install locally is the following:

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/homespun/hap-nodejs-community-types.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-12-29T08_10_45_162Z-debug-0.log

Google is not helping me too much, so I might turn to reddit.

cmlpreston commented 2 years ago

For those who want to update dependencies themselves in the meantime, from /usr/local/lib/node_modules/homebridge-bomgovau/node_modules (or wherever the package is installed, using sudo as needed etc.):

$ npm install node-fetch@2.6.6 --save

should do the trick and update the package.json for you. I don't think I needed to update fakegato-history, but I just checked and it is updated, so maybe I did. I tried lots of things before the simple method above.

mitch7391 commented 2 years ago

@cmlpreston thank you for this piece of information; this will get the plugin back in my system for the time being by the sounds!

I have worked out my issue with trying to install my fork locally for testing is due to an issue with installing the dependency hap-nodejs-community-types, as highlighted in the errors; it just was not clear to me as a beginner. I am still not sure why this dependency refuses to install; I wonder if a similar method to your suggestion might get me around it.

cmlpreston commented 2 years ago

Actually, I was getting an error like that when trying to retrieve some package or other yesterday. I wonder if GitHub was having some issues recently.

mitch7391 commented 2 years ago

Hmm I would only suspect that if it happened for a small period of time or a day at most; this has been since I submitted this PR, so I wouldn't expect issues lasting for 2 weeks.

mitch7391 commented 2 years ago

Hey Steve, thanks for merging this one and hope you enjoyed your holidays :) I still could not get that hap-nodejs-community-types dependancy to install as a part of my forked version for some reason. It just kept actively refusing it. I take it you saw no issues with the PR in the end?

SteveCohen commented 2 years ago

No issues for me! Try updating from NPM/within homebridge and let me know if you still see the errors?

mitch7391 commented 2 years ago

Awesome, glad to hear! This was quite a curious one for me. I’ll let you know if I figure it out :)