You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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.
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:
Run the following command to see a list of ports in use:
netstat -anf inet
Open the file srv.app.js
Change the port in the following line to one that is open:
var kickstart = kickstart.withConfig({'name': 'localhost', 'port': 9000, 'path': './'});
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.
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)
The text was updated successfully, but these errors were encountered: