greggman / HappyFunTimes

A System for creating 10-100+ player local games
http://greggman.github.io/HappyFunTimes
BSD 3-Clause "New" or "Revised" License
381 stars 55 forks source link

Issue starting "TypeError: Cannot read property 'stdout' of undefined" #14

Closed stalgiag closed 8 years ago

stalgiag commented 8 years ago

Hello! I was just starting to work on a new game for HFT and I went to start up the app and I get this error. I have tried uninstalling (config files and all) and reinstalling. I am running Mac OS 10.9. I have run and developed for HFT until very recently. I have tried opening from the app icon and from terminal with the same result. Also I have started as root. I fear it is a node issue of some kind which is an area that I am a little unfamiliar with.

using ip address: 10.0.1.xx

WARNING!!!: EACCES: could NOT connect to port: 80

Listening on port(s): 18679, 8080

/Applications/HappyFunTimes.app/Contents/hft/lib/computername.js:38
    computerName = res.stdout.split()[0];
                      ^

TypeError: Cannot read property 'stdout' of undefined
    at /Applications/HappyFunTimes.app/Contents/hft/lib/computername.js:38:23
    at ChildProcess.<anonymous> (/Applications/HappyFunTimes.app/Contents/hft/lib/utils.js:67:7)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

The fact that port 80 isn't opened hasn't mattered in the past. I assume that it can't get access to 80 because it isn't running in root. I don't think this is the issue.

Thanks in advance!

greggman commented 8 years ago

Sorry there was trouble.

If you open a terminal and type

scutil --get ComputerName

what does it say?

stalgiag commented 8 years ago

Thanks for replying! When I do that I get back

ComputerName: not set

That is odd. My ComputerName must have gotten reset at some point. I fixed with --

sudo scutil --set ComputerName <new name>

Thanks so much for the help! You are the best!