Olá, após fazer a parte do carregamento automatico de modulos quando tento rodar o programa o seguinte problema surge:
TypeError: /Users/josecarlosferreira/Desktop/casadocodigo/app/views/produtos/lista.ejs:19
17| </thead>
18| <tbody>
>> 19| <% for(var i=0; i < lista.length; i++) {%>
20| <tr>
21| <td><%=lista[i].id%></td>
22| <td><%=lista[i].titulo%></td>
Cannot read property 'length' of undefined
at eval (eval at compile (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:11:30)
at returnedFn (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/ejs/lib/ejs.js:555:17)
at tryHandleCache (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/ejs/lib/ejs.js:203:34)
at View.exports.renderFile [as engine] (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/ejs/lib/ejs.js:412:10)
at View.render (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/express/lib/view.js:128:8)
at tryRender (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/express/lib/application.js:640:10)
at EventEmitter.render (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/express/lib/application.js:592:3)
at ServerResponse.render (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/express/lib/response.js:971:7)
at Query._callback (/Users/josecarlosferreira/Desktop/casadocodigo/app/routes/produtos.js:7:17)
at Query.Sequence.end (/Users/josecarlosferreira/Desktop/casadocodigo/node_modules/mysql/lib/protocol/sequences/Sequence.js:86:24)