superscript-websocket-demo icon indicating copy to clipboard operation
superscript-websocket-demo copied to clipboard

Code Broken

Open kambojankit opened this issue 8 years ago • 4 comments
trafficstars

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

kambojankit avatar Feb 23 '17 21:02 kambojankit

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

silentrob avatar Feb 23 '17 21:02 silentrob

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

kambojankit avatar Feb 23 '17 22:02 kambojankit

@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 avatar Sep 27 '17 21:09 jenniferzhu

This one is still unsolved... any thoughts?

jenniferzhu avatar Sep 29 '17 22:09 jenniferzhu