shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Cannot find module 'multicast-dns'

nandito opened this issue · comments

Summary

There seems to be a missing dependency in v0.19.2 which crashes the app on start.

Steps to reproduce

  1. Create a new project: npm init --yes and set "type": "module", in the package.json
  2. Install werift: npm i --save werift
  3. Create an index.js:
    import * as werift from "werift";
    
    console.log(werift);
  4. Start the app
    $ node index.js
    

Results

Expected: werift should be logged out.
Actual: the app crashes with a Cannot find module 'multicast-dns' error.

Full output:

node:internal/modules/cjs/loader:1145
  const err = new Error(message);
              ^

Error: Cannot find module 'multicast-dns'
Require stack:
- /path/to/demo/node_modules/werift/lib/ice/src/dns/lookup.js
- /path/to/demo/node_modules/werift/lib/ice/src/ice.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/path/to/demo/node_modules/werift/lib/ice/src/dns/lookup.js:7:41)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Module.require (node:internal/modules/cjs/loader:1233:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/path/to/demo/node_modules/werift/lib/ice/src/dns/lookup.js',
    '/path/to/demo/node_modules/werift/lib/ice/src/ice.js'
  ]
}

Node.js v20.14.0