Syntax error when starting server

69 views
Skip to first unread message

Anders Persson

unread,
Jun 22, 2019, 1:08:17 PM6/22/19
to PeerJS
I try to start the server with 


./peerjs --port 9999 --key peerjs --path /myapp

and get this message:

/home/user/PeerServer/peerjs-server/src/index.js:9
const init = ({ app, server, options }) => {
              ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/anders/PeerServer/peerjs-server/bin/peerjs:7:20)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)


What can I have done wrong?

Anders
Reply all
Reply to author
Forward
0 new messages