SyntaxError: Unexpected token for at Object.Function (<anonymous>) node.js

I'm using Express, EJS and mongoose for a website learning exercise.

Here is my index.js module:

blog_model = require('./connection').blog_model;
/*
 * GET home page.
*/

exports.index = function(req, res)
{

  var rubric, url, logout, tunes;

  if(req.user != null)
  {
    url='/internal_index';
    rubric='To the backroom, ' + req.user.fullName;
    logout='logout';
  }
  else
  {
    url='/login';
    rubric='login';
    logout='';
  }

  blog_model.find(({}, function(err, tunes) 
  {
    console.log('tunes: ' + tunes)

    res.render('index', { title: 'blah', 
                        url : url, 
                        rubric : rubric,
                        logout : logout
                    });
  }))
};

I get the following error:

SyntaxError: Unexpected token for
    at Object.Function (<anonymous>)
    at exports.compile (/Users/chrisaugier/Web/frontRoom/node_modules/ejs/lib/ejs.js:234:12)
    at Object.exports.render (/Users/chrisaugier/Web/frontRoom/node_modules/ejs/lib/ejs.js:273:10)
    at View.exports.renderFile [as engine] (/Users/chrisaugier/Web/frontRoom/node_modules/ejs/lib/ejs.js:303:22)
    at View.render (/Users/chrisaugier/Web/frontRoom/node_modules/express/lib/view.js:75:8)
    at Function.app.render (/Users/chrisaugier/Web/frontRoom/node_modules/express/lib/application.js:506:10)
    at ServerResponse.res.render (/Users/chrisaugier/Web/frontRoom/node_modules/express/lib/response.js:756:7)
    at Promise.<anonymous> (/Users/chrisaugier/Web/frontRoom/routes/index.js:28:9)
    at Promise.<anonymous> (/Users/chrisaugier/Web/frontRoom/node_modules/mongoose/node_modules/mpromise/lib/promise.js:162:8)

But the query to the db is working.

Any help greatly appreciated.

Chris

edit

The following is my EJS Template code. The potential problem part is the for loop as it was recently added in. However the first thing I tried was commenting this out and the same error was still given.

<!DOCTYPE html>
<html>
  <head>
    <title>title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='stylesheet' type="text/css" href="stylesheets/grid.css"/>
<link rel='stylesheet' type="text/css" href="stylesheets/normalize.css"/>
<link rel='stylesheet' type="text/css" href="stylesheets/style.css"/>
  <body>
   <div class="loginbar">
      <a href="<%= url%>"><%= rubric%></a>
      <a href='/logout'><%= logout%></a>
    </div>
    <div class="slide" id="slide1" data-slide="1" data-stellar-background-ratio="0.5">
      <div class="container clearfix">
        <div id="header" class="grid_7">
          <h1>frontRoom</h1>
          <h2>...don't go in the back room.</h2>
          <p><i>"Let " </i> - Bagehot</p>
        </div>
        <ul class="navigation">
          <li data-slide="1">Tunes</li>
          <li data-slide="2">Collaborators</li>
          <li data-slide="3">Blog</li>
          <li data-slide="4">About</li>
        </ul>
      </div>
    </div>
    <div class="slide" id="slide2" data-slide="2" data-stellar-background-ratio="0.5">
      <div class="container clearfix">
        <h1>Tunes</h1>
        <h2>Latest reviews</h2>
        <%= for (vari=0;i<tunes.length;i++){%>
        <div class="grid_5">
          <h3><%= tunes[i].title %></h3>
          <p><%= tunes[i].body %></p>
        </div>
        <%= }%>
      </div>
    </div>
    <div class="slide" id="slide3" data-slide="3" data-stellar-background-ratio="0.5">
      <div class="container clearfix">
        <h1>Collaborators</h1>
        <div class="grid_3">
          <h2>blah</h2>
          <p>Lore.</p>
        </div>
        <div class="grid_3">
          <h2>blah/h2>
          <p>Loremnim. </p>
        </div>
        <div class="grid_3">
          <h2>Cblah</h2>
          <p>Sed pretiagna eu.</p>
        </div>
      </div>
    </div>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.stellar.min.js"></script>
    <script type="text/javascript" src="js/waypoints.min.js"></script>
    <script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="js/scripts.js"></script>
  </body>
</html>

The problem was the syntax on the for loop. I mistakenly had added an equals to the lines that did not require it.

<%= for( var i=0; i<tunes.length; i++) { %>
<%= } %>

Becomes:

<% for( var i=0; i<tunes.length; i++) { %>
<% } %>

and works.

Thanks to Andrew for drawing my attention to the source of the issue.

Try removing the extra set of brackets in blog_model.find

ie. ({}, ... ) instead of (({}, ... )).