安装了body-parser,还是拿不到post提交的电影数据

http://img.mukewang.com/56ce7f660001575310300379.jpg

看的视频是  node+mongodb 建站攻略(一期)

TypeError: Cannot read property 'movie' of undefined
   at e:\BaiduYunDownload\nodejs\imooc\app.js:83:19
   at Layer.handle [as handle_request] (e:\BaiduYunDownload\nodejs\imooc\node_modules\express\lib\router\layer.js:95:5)
   at next (e:\BaiduYunDownload\nodejs\imooc\node_modules\express\lib\router\route.js:131:13)
   at Route.dispatch (e:\BaiduYunDownload\nodejs\imooc\node_modules\express\lib\router\route.js:112:3)
   at Layer.handle [as handle_request] (e:\BaiduYunDownload\nodejs\imooc\node_modules\express\lib\router\layer.js:95:5)
   at e:\BaiduYunDownload\nodejs\imooc\node_modules\express\lib\router\index.js:277:22
   at Function.process_params (e:\BaiduYunDownload\nodejs\imooc\node_modules\express\lib\router\index.js:330:12)
   at next (e:\BaiduYunDownload\nodejs\imooc\node_modules\express\lib\router\index.js:271:10)
   at e:\BaiduYunDownload\nodejs\imooc\node_modules\body-parser\lib\read.js:129:5
   at invokeCallback (e:\BaiduYunDownload\nodejs\imooc\node_modules\body-parser\node_modules\raw-body\index.js:262:16)
   at done (e:\BaiduYunDownload\nodejs\imooc\node_modules\body-parser\node_modules\raw-body\index.js:251:7)
   at IncomingMessage.onEnd (e:\BaiduYunDownload\nodejs\imooc\node_modules\body-parser\node_modules\raw-body\index.js:308:7)
   at emitNone (events.js:67:13)
   at IncomingMessage.emit (events.js:166:7)
   at endReadableNT (_stream_readable.js:905:12)
   at doNTCallback2 (node.js:441:9)

272
浏览 2799回答 3
3回答

qq_快追_03559885

我的解决了,function (req, res) 应该写反了

qq_快追_03559885

我也遇到这个问题了,请问lz解决了么?

慕郎_莲华

记得选择代码语言 好看些~把你的node代码贴一下嘛,看你咋写的
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Node.js