Turtus icon indicating copy to clipboard operation
Turtus copied to clipboard

TypeError: Cannot read property 'WebSocketAdapter' of undefined

Open nurdism opened this issue 6 years ago • 3 comments

I cant get the web package to run, running into this error:

(anonymous function) src/pages/Room/index.js:40

  37 |   : server
  38 | console.log(wsurl)
  39 | // TODO: move this to a more global configuration
> 40 | const adapter = new turtus.Adapters.WebSocketAdapter(wsurl)
     | ^  41 | const manager = new turtus.P2PManager(opts)
  42 | manager.setAdapter(adapter)
  43 | 

▶ 19 stack frames were collapsed. Module../src/index.js src/index.js:7

   4 | import App from './App';
   5 | import * as serviceWorker from './serviceWorker';
   6 | 
>  7 | ReactDOM.render(<App />, document.getElementById('root'));
   8 | 
   9 | // If you want your app to work offline and load faster, you can change
  10 | // unregister() to register() below. Note this comes with some pitfalls.

webpack_require turtus/services/web/webpack/bootstrap:785

  782 | };
  783 | 
  784 | // Execute the module function
> 785 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
      | ^  786 | 
  787 | // Flag the module as loaded
  788 | module.l = true;

fn turtus/services/web/webpack/bootstrap:150

  147 | 		);
  148 | 		hotCurrentParents = [];
  149 | 	}
> 150 | 	return __webpack_require__(request);
      | ^  151 | };
  152 | var ObjectFactory = function ObjectFactory(name) {
  153 | 	return {

turtus/services/web/webpack/bootstrap:785

  782 | };
  783 | 
  784 | // Execute the module function
> 785 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
      | ^  786 | 
  787 | // Flag the module as loaded
  788 | module.l = true;

checkDeferredModules turtus/services/web/webpack/bootstrap:45

  42 | 	}
  43 | 	if(fulfilled) {
  44 | 		deferredModules.splice(i--, 1);
> 45 | 		result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
     | ^  46 | 	}
  47 | }
  48 | 

Array.webpackJsonpCallback [as push] turtus/services/web/webpack/bootstrap:32

  29 | 	deferredModules.push.apply(deferredModules, executeModules || []);
  30 | 
  31 | 	// run deferred modules when all chunks ready
> 32 | 	return checkDeferredModules();
     | ^  33 | };
  34 | function checkDeferredModules() {
  35 | 	var result;

(anonymous function)

nurdism avatar Dec 30 '19 03:12 nurdism

First I'd like to apologize for not getting back to you for two whole months... I pretty much abandoned this project when I got a new job and I didn't notice or expect that this repository would get any attention at all.

The problem here was just that I had a version of the turtus-lib package locally linked to the project that was out of date on github...so that's my bad. I probably should have emphasized how unfinished and experimental all of this was in my readme. Sorry if that caused you any frustration.

I actually only noticed this issue coincidentally when I checked reddit to see if anybody else had made any progress on a rabb.it clone, saw that someone mentioned your Neko repository, and then saw that you had referenced this one hahaha. It looks like you're miles ahead of me now

Khauri avatar Feb 29 '20 00:02 Khauri

It looks like you're miles ahead of me now

@Khauri It's the circle of life... Welcome to how I felt when I found your project! :joy:

I also got a new job that got in the way of side project development

SimplyLinn avatar Feb 29 '20 06:02 SimplyLinn

It's all good, your project gave me enough of a push to get started on neko :P thanks for publishing what you had

nurdism avatar Mar 01 '20 01:03 nurdism