报_id未定义,看不出来哪里错了,仔细对比了老师的代码。。
TypeError: Cannot read property '_id' of undefined
at app.get.Movie.fetch.res.render.title (d:\nodejs\workspace\imooc\app.js:88:28)
at Layer.handle [as handle_request] (d:\nodejs\workspace\imooc\node_modules\express\lib\router\layer.js:82:5)
at next (d:\nodejs\workspace\imooc\node_modules\express\lib\router\route.js:110:13)
at Route.dispatch (d:\nodejs\workspace\imooc\node_modules\express\lib\router\route.js:91:3)
at Layer.handle [as handle_request] (d:\nodejs\workspace\imooc\node_modules\express\lib\router\layer.js:82:5)
at d:\nodejs\workspace\imooc\node_modules\express\lib\router\index.js:267:22
at Function.proto.process_params (d:\nodejs\workspace\imooc\node_modules\express\lib\router\index.js:321:12)
at next (d:\nodejs\workspace\imooc\node_modules\express\lib\router\index.js:261:10)
at serveStatic (d:\nodejs\workspace\imooc\node_modules\express\node_modules\serve-static\index.js:59:14)
at Layer.handle [as handle_request] (d:\nodejs\workspace\imooc\node_modules\express\lib\router\layer.js:82:5)