SyntaxError: Unexpected token (


#1

Hi,

I admire the efforts the glitch team has put into the platform. I am using glitch for a while now and it’s a wonderful platform. I am getting an error in app.js:18 in project bright-bread.

app.get('/', async (req, res) => {
                   ^
SyntaxError: Unexpected token (
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)
    at startup (bootstrap_node.js:153:9)

I would appreciate it if someone from glitch could look into the issue.


#2

Seems like you are using older version of node, and its not recognizing async so your best bet is to use node verison 8+