SyntaxError: missing ] after element list

Look for the opening [ that the parser was trying to close. In a long expression, it may start an array literal, a nested array or a bracket access. A malformed string inside the list can also shift the point where the parser reports the missing bracket.
Put the items on separate lines and align the opening and closing brackets. Check commas and quotes at the boundary where parsing stopped. If the expression uses an array pattern or nests an array in a function call, follow the surrounding delimiters as well.
const tags = ['news', 'events', 'support']; console.log(tags[0]);
In the tags example, the bracket in tags[0] belongs to the lookup after the array declaration. Keep the surrounding expression in your test so the parser checks the closing bracket in its actual context.
Reparse the array with its surrounding expression and verify that each [ is paired with the intended ].