Syntax error means there’s something that’s breaking rules of the programming language. Because of that place where error is detected may not be the same line in which error is. Take a closer look at line with await and particularly at the brackets in that line.