dgreif / homebridge-hatch-baby-rest

A homebridge plugin for Hatch Baby Rest night light
MIT License
74 stars 19 forks source link

Lack of prebuilt binaries appears to slow down updates/installs of other plugins #22

Closed HammerAce42 closed 4 years ago

HammerAce42 commented 4 years ago

Whenever I update other plugins, I now see this message, and it takes a fair amount of time to complete. I am not well versed with npm, so I am unclear why an unrelated plugin update is causing new binaries to be built for dependencies of this plugin. Any ideas how to avoid this from happening? I am using Docker homebridge, in case that's relevant. Here is an example of what I see when updating another plugin:

> usb@1.6.3 install /homebridge/node_modules/homebridge-hatch-baby-rest/node_modules/usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/509042-usb-v1.6.3-node-v72-linuxmusl-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linuxmusl-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linuxmusl-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.16.3 runtime=node arch=arm libc=musl platform=linux)
make: Entering directory '/homebridge/node_modules/homebridge-hatch-baby-rest/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
dgreif commented 4 years ago

@HammerAce42 what version of npm do you have installed? npm -v I think later versions of npm do a better job of not rebuilding binaries when they haven't been updated.

HammerAce42 commented 4 years ago

I am on npm v6.14.4. Strangely, I stopped seeing the issue in the last few days, despite not having updated npm, so not sure what changed.

dgreif commented 4 years ago

Ok, sounds good. I'll close this for now, but let me know if you start seeing this issue again

HammerAce42 commented 3 years ago

I am seeing this issue again:

Node.js Version | v14.15.5 NPM Version | v6.14.11

> usb@1.6.4 install /homebridge/node_modules/homebridge-hatch-baby-rest/node_modules/usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/f7818c-usb-v1.6.4-node-v83-linuxmusl-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.4/usb-v1.6.4-node-v83-linuxmusl-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.4/usb-v1.6.4-node-v83-linuxmusl-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=14.15.5 runtime=node arch=arm libc=musl platform=linux)
make: Entering directory '/homebridge/node_modules/homebridge-hatch-baby-rest/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:10: fatal error: libudev.h: No such file or directory
   40 | #include <libudev.h>
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [libusb.target.mk:148: Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/homebridge/node_modules/homebridge-hatch-baby-rest/node_modules/usb/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.10.11-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /homebridge/node_modules/homebridge-hatch-baby-rest/node_modules/usb
gyp ERR! node -v v14.15.5
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.4 (node_modules/homebridge-hatch-baby-rest/node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.6.4 install: `prebuild-install --verbose || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1