Thursday, 1 June 2017

NodeJS OSX Unhandled 'error' event

So I'm creating a server with: const server = require('http').createServer();

Creating const io const io = require('socket.io')(server);

And doing server.listen();

var port = 4000;
server.listen(port);

But I'm getting this error and after a few hours searching and trying things I'm here on stackoverflow to ask here.

terminal

Things I have tried include: Clearing port, Restarting computer, Changing port, Reinstalling node, Updating node and, Running as administrator

Thanks for your help.



via The Human

No comments:

Post a Comment