Minha aplicacao sempre exibe o erro na hora de renderizar a lista. Mesmo baixando o codigo do curso, da o mesmo erro. Segue:
TypeError: /home/josue/Downloads/casadocodigo/app/views/produtos/lista.ejs:11 9| 10|
11| <% for(var i=0; i 12|
Cannot read property 'length' of undefined at eval (eval at compile (/home/josue/Downloads/casadocodigo/node_modules/ejs/lib/ejs.js:549:12), :11:28) at returnedFn (/home/josue/Downloads/casadocodigo/node_modules/ejs/lib/ejs.js:580:17) at tryHandleCache (/home/josue/Downloads/casadocodigo/node_modules/ejs/lib/ejs.js:223:34) at View.exports.renderFile [as engine] (/home/josue/Downloads/casadocodigo/node_modules/ejs/lib/ejs.js:437:10) at View.render (/home/josue/Downloads/casadocodigo/node_modules/express/lib/view.js:127:8) at tryRender (/home/josue/Downloads/casadocodigo/node_modules/express/lib/application.js:640:10) at Function.render (/home/josue/Downloads/casadocodigo/node_modules/express/lib/application.js:592:3) at ServerResponse.render (/home/josue/Downloads/casadocodigo/node_modules/express/lib/response.js:971:7) at Query._callback (/home/josue/Downloads/casadocodigo/app/routes/produtos.js:7:17) at Query.Sequence.end (/home/josue/Downloads/casadocodigo/node_modules/mysql/lib/protocol/sequences/Sequence.js:88:24)
Esta faltando alguma dependência para funcionar o loop?