Quando tento acessar a rota /produtos aparece o seguinte erro:
Error: Failed to lookup view "produtos/lista" in views directory "C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\views"
at EventEmitter.render (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\application.js:579:17)
at ServerResponse.render (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\response.js:960:7)
at C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\app.js:7:14
at Layer.handle [as handle_request] (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\router\route.js:131:13)
at Route.dispatch (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\router\layer.js:95:5)
at C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\router\index.js:277:22
at Function.process_params (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\router\index.js:330:12)
at next (C:\Users\wesley\Desktop\alura\nodejs\casadocodigo\node_modules\express\lib\router\index.js:271:10)
Segue o código do app.js
var express = require('express');
var app = express();
app.set('view engine', 'ejs');
app.get('/produtos', function(request, response) {
response.render('produtos/lista');
});
app.listen(3000, function() {
console.log('Servidor Rodando!');
});