silentrob / superscript-websocket-demo

WebSocket example app
18 stars 9 forks source link

Code Broken #6

Open kambojankit opened 7 years ago

kambojankit commented 7 years ago

I have followed the said build steps, but still the unable to run the project.

I had to update 'server.js' file with the following changes, to allow compilation:

facts.default.load(data, 'localdata', true, function(err, facts){

but now i get into another issue as below:

superscript-websocket-demo/node_modules/mongojs/lib/database.js:43
    this._dbname = parse(connString.options.url).dbName
                                           ^

TypeError: Cannot read property 'url' of undefined
    at new Database (/Users/ankit/Development/Projects/super-BOT/superscript-websocket-demo/node_modules/mongojs/lib/database.js:43:44)
    at module.exports (/Users/ankit/Development/Projects/super-BOT/superscript-websocket-demo/node_modules/mongojs/index.js:5:12)
    at clean (/Users/ankit/Development/Projects/super-BOT/superscript-websocket-demo/node_modules/sfacts/lib/system.js:34:36)
    at create (/Users/ankit/Development/Projects/super-BOT/superscript-websocket-demo/node_modules/sfacts/lib/system.js:51:12)
    at Object.load (/Users/ankit/Development/Projects/super-BOT/superscript-websocket-demo/node_modules/sfacts/lib/system.js:63:3)
    at Object.<anonymous> (/Users/ankit/Development/Projects/super-BOT/superscript-websocket-demo/server.js:49:15)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3
silentrob commented 7 years ago

Good catch. This repo hasn't been updated to reflect the changes in the new v1.0 version. I will update it this weekend.

kambojankit commented 7 years ago

Thanks for the prompt response, i got it up using a few quick hacks, like updating the port at which mongod is running and updating the last few lines of server.js as below, but this kills certain parts of the application at runtime.

facts.default.load('localdata',data, false, function(err, facts){
  options.factSystem = facts;

  ss.default.setup(options, function(err, botInstance){
    botHandle(null, botInstance);
  });
});

Updates to v1 will be greatly helpful

jenniferzhu commented 7 years ago

@silentrob how to update to v1? This version thing drives me crazy too: facts.load(data, 'localdata', function(err, facts){ ^

TypeError: facts.load is not a function at Object. (/Users/xuanzhu/superscript-websocket-demo/server.js:49:7) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.runMain (module.js:605:10) at run (bootstrap_node.js:420:7) at startup (bootstrap_node.js:139:9) at bootstrap_node.js:535:3

jenniferzhu commented 7 years ago

This one is still unsolved... any thoughts?