Some Weird Bug With Installation

I have tried installing mediasoup by cloning the github repository and running “npm install”.
However I think it is not installing properly.

I am using node v8.10.0, npm v6.9.0, ubuntu 18.04. Here are npm install messages.

npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN lifecycle mediasoup@3.1.5~postinstall: cannot run in wd mediasoup@3.1.5 make -C worker (wd=/home/ubuntu/mediasoup)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

I seem to have the same problem when attempting to setup any of the demos. Mediasoup complains of a missing file, likely from a problem with a build process.

{ Error: spawn /home/ubuntu/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn /home/ubuntu/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker',
path: '/home/ubuntu/mediasoup-sample-app/node_modules/mediasoup/worker/out/Release/mediasoup-worker',
spawnargs:
[ '--logLevel=warn',
'--logTag=info',
'--logTag=ice',
'--logTag=dtls',
'--logTag=rtp',
'--logTag=srtp',
'--logTag=rtcp',
'--rtcMinPort=10000',
'--rtcMaxPort=10100' ] }

I do not see any real (critical) error there but just some warnings. Can you paste the entire stdout/stderr after calling npm install in the mediasoup root folder?

No where in the doc is said that mediasoup must be installed by cloning the repo and running npm install on it. May be the postinstall task in package.json is not being executed when doing that.

In order to test a cloned mediasoup repo, there are docs here.

Try this:

  • Enter the mediasoup/worker/ folder.
  • Run make (paste the output).
  • Run npm test (paste the output).