Closed shannondpasto closed 2 years ago
Oh I just submitted this as a question on reddit and was pointed in the right direction by another developer. @SteveCohen apparently the issue is with node-fetch
"dependencies": {
"node-fetch":">=1.0",
"fakegato-history": ">0.4.0",
"hap-nodejs-community-types": "https://github.com/homespun/hap-nodejs-community-types.git"
}
I was advised you should be using ^
instead of >=
and the version should be taken to 2.6.6
; so all up should be changed to "node-fetch":"^2.6.6"
. I have just created a PR for it if you want to take a look Steve (and make sure I did not do it wrong)?
Thanks Mitch, that's interesting. I'm learning here too!
I read the reddit thread. Judging by Western_Icy's comment ("esm modules and currently incompatible with homebridge") it sounds like >=1.0
doens't work because it's installing a module that's too new, and not compatible with Homebridge? I'll clarify on Reddit.
Quick question in the meantime. Did you test the PR and confirm it works?
Hey Steve :) yep definitely still learning myself and only just published my first npm package recently to make my repo available on Homebridge UI.
I actually thought it was the other way around; but I could be wrong! But actually now that I think about it more; based on the ‘>=‘ it should mean that as long as the version is greater than or equal to the designated value then it should be fine. However, I do not understand what the difference is by using ‘^’ but have noted a lot of plugins I am using are using that method in their package.json
dependencies.
I tried to install my fork of your repo through ‘git clone’, ‘npm pack’ and install (something Iv only recently learned to do) for testing but it would not let me install it. Which means I have not been able to test it myself and suggest you test it yourself before approving the PR. I did do the exact same thing for a second plug-in with the exact same ‘node-fetch’ issue; it let me install the fork locally and it worked perfectly. Not sure why your plug-in won’t let me try.
Hey @SteveCohen, I tired to install my fork of your repo locally and it still will not let me due to NPM error 128; will have to look into it properly later. I am certain it is an issue with my local install of your plugin and not an issue with the changes I have made. Based on the comments from Reddit and the readings you linked there; it looks like the change is required and I will be looking forward to getting this plugin installed again. So would we be good to merge the changes and publish; or is there anything else we need to test first?
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.
Hi. Recently installed this plugin but it's not loading causing the line
No plugin was found for the accessory "BOMgovau" in your config.json. Please make sure the corresponding plugin is installed correctly.
to show up in the log. Digging a bit deeper the following also appears in the log...Installed versions Homebridge v1.3.5 Node.js v14.18.0 Npm 6.14.15
Thanks, Shannon