Monday, 15 May 2017

NodeJS & Express - esc is not a function

This is the exact error message I'm getting:

TypeError: /Users/benjidurden/Desktop/page-plant-bonham-jones/views/index.ejs:24

22| <div class="spacing"></div>
23| <div class="content">
24| <%- include ./partials/loops %>
25| </div>
26|  <%- include ./partials/scripts %>
27|   </body>

esc is not a function at rethrow

(/Users/benjidurden/Desktop/page-plant-bonham-jones/node_modules/ejs/lib/ejs.js:285:18)

Below shows the content of the loops.ejs; the following loop exists inside. Essentially, I was trying to generate a forEach loop that places all of the content inside of this div. Regardless, I don't know how to fix this mistake. Any advice?

<ul>
<% data.forEach(function(d) { %>
<li data-id=<%=d.id%>>
<input class="input_item" type="text" name="first" 
        placeholder=<%= d.album %> readonly>
      <span class="edit">edit</span>
      <span class="delete">delete</span>
    </li> 
   <% }) %>
</ul>



via Benji Durden

No comments:

Post a Comment