I think it is due to error in this line
<% clients.forEach(fucntion(client){ %>
Since you mis-spelled function it cannot account for {
function
{