Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working #2

Open
Tanek81 opened this issue Nov 10, 2014 · 5 comments
Open

Not working #2

Tanek81 opened this issue Nov 10, 2014 · 5 comments

Comments

@Tanek81
Copy link

Tanek81 commented Nov 10, 2014

Hi,
sorry to bother you, I'd like to set up a server, I installed dependencies as required but then server.coffee throws exceptions.
I did a search for these errors (as I am not familiar with Node.js), the main causes seem to be:

  1. newer version of Node.js dropped support for app.configure: solved deleting server.coffee:15.
  2. newer version of Node.js and Express have different usage for middleware like "cookie-parser" (server.coffee:16): solved (I think :P ) with a different call, as below.
    cookieParse = require('cookie-parser')
    app.use(cookieParse('secret stuff!'))

Solved the above errors, I still have this one:
C:\the-resistance-master\server.coffee:174
socket.rooms = io.sockets.manager.roomClients[socket.id];
^
TypeError: Cannot read property 'roomClients' of undefined
at Namespace. (C:\the-resistance-master\server.coffee:112:38)
at Namespace.emit (events.js:95:17)
at Namespace.emit (C:\the-resistance-master\node_modules\socket.io\lib\namespace.js:205:10)
at C:\the-resistance-master\node_modules\socket.io\lib\namespace.js:172:14
at process._tickCallback (node.js:419:13)

I did a search and it looks like also socket.io has had some big changes since 2012.
Can you please help? Or maybe, can you point out which older version of Node.js and Express should be used (and forced) during installation?
I really would like to set up a server and play with my friends, I am also willing to help but as I wrote I am not familiar with Node (although I am considering to follow an online course on it, maybe next month).
Thank you very much.

@alandwarinasia
Copy link
Contributor

@Tanek81 did you ever figure this out? I got to basically the same place you are; solved the first error by installing an older version of Express, but now stuck at the 'cannot read property' error...

@Tanek81
Copy link
Author

Tanek81 commented Jan 4, 2015

Unfortunately I have no news on this issue and I have not improved my Node.js knowledge, so I couldn't dig it deeper.
I hope someone can help as I still would like to set up a server.

@alandwarinasia
Copy link
Contributor

@Tanek81 Thanks for the quick response. After further tinkering, I was able to get things running by reverting to older versions of both Socket.IO (0.9.14) and Mongoskin (0.6.3) as well.

@Tanek81
Copy link
Author

Tanek81 commented Jan 4, 2015

@sinistarlives Thank you very much, can you write a small summary of all the older version you used? (also as a future reference)

  • Node.js ?
  • Express ?
  • Socket.IO 0.9.14
  • Mongoskin 0.6.3

@alandwarinasia
Copy link
Contributor

Node.js 0.8.26
Express 3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants