socket.io-p2p icon indicating copy to clipboard operation
socket.io-p2p copied to clipboard

NodeJS Support

Open bnap00 opened this issue 6 years ago • 0 comments

If installed on a NodeJS server, this gives an error of window undefined. There is a simple fix to it (if this does not get merged, as it seems to be inactive repo)

  • Use my fork to install using any of the following commands
yarn add bnap00/socket.io-p2p
npm install bnap00/socket.io-p2p
  • Create a fork of the repo and add the following lines to the index.js
if(window){
if ('undefined' != typeof window) {
  window.myDebug = require('debug')
}
  • Or just go to your nodemodules and add the above line(not recommended at all, good for testing purposes)

bnap00 avatar Jul 04 '19 02:07 bnap00