SyntaxError: Unexpected identifier after installing socket.io on Node.js express webserver

Viewed 1361

I just started a new Project and set up a fresh nodeJs server, installed express and socket.io. No Problem so far, but after i wrote the basic starting code (should not be important here), and started the node js app, the following error occurred:

/var/www/node_modules/engine.io/lib/server.js:231
  async handshake(transportName, req) {
        ^^^^^^^^^
SyntaxError: Unexpected identifier

I think i did nothing wrong, but i hope you can tell me otherwise.

1 Answers

I found out, it was the node version.

Socket.IO needs at least Node.js 10.

I just overlooked that.

Related