serverless-webrtc icon indicating copy to clipboard operation
serverless-webrtc copied to clipboard

Unable to find native module

Open KipyegoEvans opened this issue 7 years ago • 2 comments

I am getting this error . UNABLE TO FIND NATIVE MODULE when I run it on Node Js

KipyegoEvans avatar Jun 14 '18 09:06 KipyegoEvans

Same here after installing with npm on Windows 10:

CWD>node node_modules\serverless-webrtc\serverless-webrtc.js
CWD\node_modules\node-cmake\index.js:40
  if(!found) throw new Error('Unable to find native module');
             ^

Error: Unable to find native module
    at requireNativeModule (CWD\node_modules\node-cmake\index.js:40:20)
    at Object.<anonymous> (CWD\node_modules\wrtc\lib\binding.js:3:39)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (CWD\node_modules\wrtc\lib\peerconnection.js:3:15)

CWD is a placeholder.

r-uhlig avatar Jan 13 '21 07:01 r-uhlig

I was also having this issue. It seems that it is missing the wrtc dependency, which first required me to install node-pre-gyp

I was able to fix this issue by installing missing dependencies by running these commands at the root of the project:

npm install node-pre-gyp
npm install wrtc

then starting the server: node .\serverless-webrtc.js

PatchyProjects avatar Nov 15 '21 22:11 PatchyProjects