florianheinemann/MPD.FM

SyntaxError: Unexpected token }

Closed this issue · 4 comments

Hey,

/usr/bin/node /home/srv-mpd-fm/MPD.FM/bin/www

gives me

/home/srv-mpd-fm/MPD.FM/bin/www:44
const wss = new WebSocket.Server( {server} );

SyntaxError: Unexpected token }
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

How can this be fixed?

Thank you.

Strange one. Which version of node do you have installed?

Oh, it's version v0.10.29. I'm still on Debian Jessie, maybe I should upgrade to stretch...

Ah, yes. That's the issue. MPD.fm is using ES6 which isn't supported by your version of node. After an update everything should run smoothly. And: No need to update Debian - just node!

Okay, thank you.