Can Evostream Rendezvous Server run on Windows?
I have a need to run ERS on Windows machines. After installing ers-2.0.0.tgz via npm, I attempt to run it with node ers.js. I get a TypeError: Cannot read property ‘prototype” of undefined. Is this a known problem with ERS (does it only run on *NIX environments), or an indication that I did something wrong? Full error output is:
C:\EvoStream2\node-ers\node_modules\ers>node ers.js
C:\EvoStream2\node-ers\node_modules\socket.io\lib\store.js:35
Store.prototype.__proto__ = EventEmitter.prototype; TypeError: Cannot read property ‘prototype’ of undefined
at Object.<anonymous> (C:\EvoStream2\node-ers\node_modules\socket.io\lib\sto
re.js:35:42)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\EvoStream2\node-ers\node_modules\socket.io\lib\man
ager.js:16:13)
at Module._compile (module.js:643:30)
C:\EvoStream2\node-ers\node_modules\socket.io\lib\store.js:35
Store.prototype.__proto__ = EventEmitter.prototype; TypeError: Cannot read property ‘prototype’ of undefined
at Object.<anonymous> (C:\EvoStream2\node-ers\node_modules\socket.io\lib\sto
re.js:35:42)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\EvoStream2\node-ers\node_modules\socket.io\lib\man
ager.js:16:13)
at Module._compile (module.js:643:30)
2 Answers
Hi,
The exception you encountered was the result of missing dependencies. This can be addressed by running npm install on the ERS root folder where the file package.json is located. Another thing to note is that ERS requires an earlier version of NodeJS – NodeJS v4.1.1.
Lastly, you will still need to setup or access a STUN or TURN server after you setup the ERS.
Here are the steps for setting up ERS on windows.
- Download and install NodeJS v.4.1.1. (LINK: https://nodejs.org/dist/v4.1.1/node-v4.1.1-x64.msi)
- Unpack ERS into a folder, and CD to that folder.
- Run npm install to install the dependencies required by the ERS.
- (optional) There are some instances where you may encounter a mime exception when you try to run the ERS on windows. If you encounter this mime exception, please run the following additional command: npm install node-static mime@1.4.0
- Open and edit the config/default.json file and set the “stunservers” and “turnservers” parameters to point to your stun and turn server.