Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.91k stars 175 forks source link

TypeError when running chat example with node0.4.8 #117

Closed pushmatrix closed 13 years ago

pushmatrix commented 13 years ago

Hey there,

I'm running currently running node0.4.8 with now.js 0.5. When I try the server part of the chat demo, node gets a TypeError: 'create requires the first argument to be an Object.' at this step: var everyone = nowjs.initialize(httpServer);

Here's the trace:

TypeError: create requires the first argument to be an Object.
    at Object.wrap (/usr/local/lib/node/.npm/now/0.5.0/package/lib/wrap.js:8:18)
    at EventEmitter.ClientGroup (/usr/local/lib/node/.npm/now/0.5.0/package/lib/clientGroup.js:107:20)
    at Object.initialize (/usr/local/lib/node/.npm/now/0.5.0/package/lib/nowServerLib.js:190:14)
    at Object.<anonymous> (/Users/db/Desktop/server.js:5:22)
    at Module._compile (module.js:407:26)
    at Object..js (module.js:413:10)
    at Module.load (module.js:339:31)
    at Function._load (module.js:298:12)
    at Array.<anonymous> (module.js:426:10)
    at EventEmitter._tickCallback (node.js:126:26)

Does now.js support node0.4.8? Thanks.

steveWang commented 13 years ago

NowJS 0.5 is fairly outdated. Is there any reason why you're using that version over, say, 0.6.1 (which is the latest release on NPM)?

pushmatrix commented 13 years ago

Hey Steve, thanks for your prompt reply. I had tried it on 0.6.1, but with no luck. I had a previous version of node (~0.2) that now.js worked with, but after the update it started to cause problems.

I now have now.js working after having re-installed node.js and npm a few times. Thanks!