If you see this in your stack trace while trying to start your node app..
TypeError: Cannot read property 'getsockname' of undefined
You might probably want to check if port/s your app is supposed to be using are being used by something else.
For example, your app uses port 80. You can check if that port is being used (via the terminal/command prompt):
sudo lsof -i:80
netstat -an | find ":80"
If nothing shows up when you do those commands, the ports are open.
If something shows up, then the port’s being used. You know what to do.