Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial install of version v0.11.6 #421

Closed
skipper79 opened this issue Jan 3, 2019 · 7 comments
Closed

initial install of version v0.11.6 #421

skipper79 opened this issue Jan 3, 2019 · 7 comments
Labels

Comments

@skipper79
Copy link

skipper79 commented Jan 3, 2019

I tried to install homebridge-hue via the UI 'plugin' of Homebridge 0.4.45 which is installed in a 'docker' this site

But get no result, probably due to a wrong directory...
image

I checked the directories and conclude that the modules are stored in /home/pi/homebridge/config/node_modules
image
Is it possible to change #this?

@ebaauw
Copy link
Owner

ebaauw commented Jan 4, 2019

I have no experience running homebridge in a Docker container. From what I read, it's causing more troubles than benefits. I run homebridge natively on Raspbian Stretch.

Having said that, some pointers:

  • I think you're checking the directories on the host system rather than from within the container? The npm logfile should be within the container.
  • What versions of node and npm are you using? Are you sure you're on a recent version of npm?
  • Normally, homebridge and its plugins are installed globally, using npm -g install ... into /usr/lib/node_modules or /usr/local/lib/node_modules (depending on how you installed NodeJS). With that setup, the dependencies per plugin are in /usr/lib/node_modules/homebridge-plugin/node_modules. In your installation, it looks like the dependencies are installed "flattened" in the main node_modules directory.
  • I think npm fails to install homebridge-hue in the last step, where it creates symbolic links from the cli utilities by homebridge-lib and homebridge-hue-utils into /usr/bin or /usr/local/bin.

@skipper79
Copy link
Author

Thanks Erik for you reply. I thought a docker is quite simple to install with less experince ;-)
I moved the hue-plugin to map node_modules and now the plugin is recognize! Also an update of nodeJS was necessary.

@skipper79
Copy link
Author

after updating homebridge the plugin got an error;
homebridge_1 | [1/6/2019, 12:58:58 PM] ==================== homebridge_1 | [1/6/2019, 12:58:58 PM] ERROR LOADING PLUGIN homebridge-hue: homebridge_1 | [1/6/2019, 12:58:58 PM] Error: Cannot find module 'deferred' homebridge_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) homebridge_1 | at Function.Module._load (internal/modules/cjs/loader.js:507:25) homebridge_1 | at Module.require (internal/modules/cjs/loader.js:637:17) homebridge_1 | at require (internal/modules/cjs/helpers.js:22:18) homebridge_1 | at Object.<anonymous> (/homebridge/node_modules/homebridge-hue/lib/HuePlatform.js:16:18) homebridge_1 | at Module._compile (internal/modules/cjs/loader.js:689:30) homebridge_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) homebridge_1 | at Module.load (internal/modules/cjs/loader.js:599:32) homebridge_1 | at tryModuleLoad (internal/modules/cjs/loader.js:538:12) homebridge_1 | at Function.Module._load (internal/modules/cjs/loader.js:530:3) homebridge_1 | [1/6/2019, 12:58:58 PM] ====================

@ebaauw
Copy link
Owner

ebaauw commented Jan 6, 2019

Looks like the dependencies of homebridge-hue (like deferred) aren't installed, or at the wrong directory.

@skipper79
Copy link
Author

skipper79 commented Jan 6, 2019

they are in an other directory;
"The ./config:/homebridge instructs docker to share the local folder config with the container. This will allow you to recreate or update the docker container without losing any Homekit settings or Homebridge plugins."

got the error after command docker exec homebridge_homebridge_1 npm install homebridge-hue:

pi@raspberrypi:~/homebridge/config $ docker exec homebridge_homebridge_1 npm install homebridge-hue npm WARN homebridge No description npm WARN homebridge No repository field. npm WARN homebridge No license field. npm ERR! path /homebridge/node_modules/homebridge-hue/node_modules/homebridge-lib/cli/hap.js npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall chmod npm ERR! enoent ENOENT: no such file or directory, chmod '/homebridge/node_modules/homebridge-hue/node_modules/homebridge-lib/cli/hap.js' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent

Looks like the installation can't handle the folder ../config

@ebaauw
Copy link
Owner

ebaauw commented Jan 6, 2019

This looks like an issue with you Docker setup. I'm sorry, I cannot help you with that.

@skipper79
Copy link
Author

ok, thnx so fare!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants