1
resposta

Error: Render error. Exception: TypeError: Cannot read property 'id' of undefined

Ao abrir o formulário para alterar o registro fica apresentando este erro no console.

Error: Render error. Exception: TypeError: Cannot read property 'id' of undefined at render (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/src/app/views/livros/form/form.marko.js:26:18) at renderer (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/marko/src/runtime/components/renderer.js:227:9) at safeRender (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/marko/src/runtime/renderable.js:6:9) at Template.render (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/marko/src/runtime/renderable.js:136:20) at ServerResponse.response.marko (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/marko/src/express.js:58:29) at /Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/src/app/rotas/rotas.js:52:10 at Layer.handle [as handle_request] (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/express/lib/router/layer.js:95:5) at next (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/express/lib/router/layer.js:95:5) at AsyncStream.error (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/node_modules/marko/src/runtime/html/AsyncStream.js:441:13) at Timeout.onTimeout (/Users/diegosantosluiz/Estudo/Alura/Nodejs/Alura-Nodejs-Parte1/casadocodigo/nodemodules/marko/src/runtime/renderable.js:17:22) at listOnTimeout (internal/timers.js:535:17) at processTimers (internal/timers.js:479:7)

1 resposta

Boa noite, Diego! Como vai?

Vc poderia postar aqui o código da página de formulário? Assim eu poderei dar uma olhada e tentar te ajudar!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software