homebridge / camera-utils

Utilities to simplify homebridge camera plugin development
18 stars 8 forks source link

Issues with dgram #606

Open ameshkin opened 3 months ago

ameshkin commented 3 months ago

Analysis

I will fork this repo to get around this issue that I can't figure out. I am using next.js and after fixing other issues, I get to this. I'm also using mac silicon which was another issue with a package homebridge requires.

⨯ ./node_modules/@homebridge/camera-utils/lib/rtp-splitter.js:13:1

Module not found: Can't resolve 'dgram'

Expected Behavior

Homebridge should be able to find required package

Steps To Reproduce

Install homebridge on a next.js site and go to any page

Logs

Import trace for requested module:
./node_modules/@homebridge/camera-utils/lib/index.js
./src/ring-client-api/streaming/streaming-session.ts
./src/ring-client-api/ring-camera.ts
./src/ring-client-api/index.ts
./src/app/admin/home/page.tsx
 ⨯ ./node_modules/@homebridge/camera-utils/lib/rtp-splitter.js:13:1
Module not found: Can't resolve 'dgram'

Configuration

Next.js v13.2.3

Environment

Process Supervisor

hb-service

Additional Context

No response

dgreif commented 1 month ago

@ameshkin that's really odd. Are you using some custom build of Node that doesn't have everything built? dgram is a built-in module in Node, so it should definitely be available