ring: Install failure - ffmpeg-for-homebridge dependency error

Bug Report

Describe the Bug

Upon attempting to install homebridge-ring through the Homebridge UI, the process fails with the error message below. It seems as if it may be failing when attempting to install the ffmpeg-for-homebridge@0.1.4 dependency? If so, any ideas? This is an entirely fresh version of homebridge (Docker) with a fresh version of the latest homebridge-ring. Thanks!

To Reproduce

Steps to reproduce the behavior:

  • Start Homebridge
  • Attempt to install homebridge-ring through the UI
  • See error

Expected behavior

I expect homebridge-ring to install successfully without error.

Screenshots/Logs



USER: root DIR: /var/lib/homebridge CMD: npm install --save homebridge-ring@11.3.1

[##################] | reify:date-fns: http fetch GET 200 https://registry.npmjs.org/d

ffmpeg-for-homebridge@0.1.4 install node install.js

node:internal/modules/cjs/loader:988s: http fetch GET 200 https://registry.npmjs.org/d throw err; ^

Error: Cannot find module ‘/homebridge/node_modules/homebridge-ring/node_modules/ffmpeg-for-homebridge/install.js’ at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15) at Function.Module._load (node:internal/modules/cjs/loader:833:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:22:47 { code: ‘MODULE_NOT_FOUND’, requireStack: [] } npm ERR! code 1 npm ERR! path /homebridge/node_modules/homebridge-ring/node_modules/ffmpeg-for-homebridge npm ERR! command failed npm ERR! command sh -c – node install.js

npm ERR! A complete log of this run can be found in: npm ERR! /home/homebridge/.npm/_logs/2022-10-16T21_30_58_267Z-debug-0.log

Operation failed. Please review log for details.



Additional context

I have successfully run homebridge-ring for over a year on a different device (Raspberry Pi), and I’m attempting a fresh install on a new device (Synology DS220+). In both cases, I’m running homebridge in a Docker container. I tried the following:

  • importing my original Homebridge backup
  • starting from a new Homebridge clean install
  • installing homebridge-ring through the web UI
  • installing homebridge-ring through the homebridge terminal

Homebridge Ring Config

Post homebridge-ring platform config without sensitive information


No config as the plugin will not install

Environment

  • OS: Docker on a Synology NAS (DSM7)
  • Node.js: 16.18.0
  • NPM: 8.19.2
  • homebridge-ring: latest (can’t actually install)
  • homebridge: 1.5.0
  • hoobs: N/A

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (1 by maintainers)

Most upvoted comments

Thank you all. I was definitely in the wrong directory.

image

I can see the Homebridge-Ring plugin and I’m able to configure it.

Thanks all! The solution mentioned above in @eoghanobrien’s reply worked! After manually updating package.json to include homebridge-ring, it installed as expected over the command line.

In case it helps anyone else, these are the outputs of the requested commands above: node -v v16.18.0

which node /opt/homebridge/bin/node

npm -v 8.19.2

which npm /opt/homebridge/bin/npm

After running $(which node) $(which npm) install, part of my output indicated that ffmpeg-for-homebridge was installed correctly too: ffmpeg has been downloaded to /volume1/docker/homebridge/node_modules/homebridge-ring/node_modules/ffmpeg-for-homebridge/ffmpeg

Finally, I had actually switched to @tsightler’s ring-mqtt tool through Home Assistant, so really appreciate your help working through this on Homebridge too!

If you just type node -v from a shell prompt, what is the output? The output of which node might also be interesting.