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

Cannot read property 'port' of null #14

Open
christaggart opened this issue Nov 4, 2012 · 3 comments
Open

Cannot read property 'port' of null #14

christaggart opened this issue Nov 4, 2012 · 3 comments

Comments

@christaggart
Copy link

I've had no issue with socketio in the past, but running the example results in this. I haven't changed any of the settings in srv.app.js or anything else.

node srv.web.js
info - socket.io started

timers.js:103
if (!process.listeners('uncaughtException').length) throw e;
^
TypeError: Cannot read property 'port' of null
at /Users/me/Projects/noduino/srv.web.js:17:83
at Object.context.execCb (/Users/me/Projects/noduino/node_modules/requirejs/bin/r.js:1692:33)
at Object.Module.check (/Users/me/Projects/noduino/node_modules/requirejs/bin/r.js:948:51)
at Object.Module.enable (/Users/me/Projects/noduino/node_modules/requirejs/bin/r.js:1211:22)
at Object.Module.init (/Users/me/Projects/noduino/node_modules/requirejs/bin/r.js:861:26)
at Object.context.makeRequire.mixin.isBrowser as _onTimeout
at Timer.list.ontimeout (timers.js:101:19)

@glidej
Copy link

glidej commented Dec 5, 2012

Make sure you're not using port 8080 (used in srv.app.js) or 8090 (used in srv.socket.js) for something else. I ended up changing 8080 to 8081 and it worked for me.

@karmakazi
Copy link

I have this exact issue too. I have run it with default setting and I've changed the port still no dice.

@karmakazi
Copy link

I figured this one out. If I was running this on a server I wouldn't have had a issue but I'm running this on my laptop... and.... as it turns out I have a lot of ports open. I think anybody running this on OSX on their personal computer will likely have port conflicts. I would advise creating some kind of config file that makes changing this easier.

Here how to fix the problem:

  1. Run the following command to see a list of ports in use:
    netstat -anf inet

  2. Open the file srv.app.js

  3. Change the port in the following line to one that is open:
    var kickstart = kickstart.withConfig({'name': 'localhost', 'port': 9000, 'path': './'});

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

3 participants