shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4
MIT License
463 stars 29 forks source link

add local packages as dependencies for werift-webrtc #387

Closed kevindhanna closed 2 months ago

kevindhanna commented 2 months ago

This PR adds local packages (werift-ice, werift-rtp, werift-common, etc) as dependencies of werift-webrtc.

Related issue: https://github.com/shinyoshiaki/werift-webrtc/issues/386

The multicast-dns package was added to werift-ice and was subsequently not being installed with werift-webrtc. This is because we import the werift-ice code with relative imports, i.e.

import { Connection } from "../../../ice/src";

This was making it impossible to use werift-webrtc without manually adding multicast-dns as a dependency of whatever project is using werift-webrtc, otherwise it would throw:

node:internal/modules/cjs/loader:1147
  throw err;
  ^

Error: Cannot find module 'multicast-dns'

Adding local packages as dependencies of werift-webrtc fixes this issue and any future new dependencies added won't cause problems