bodyParser()方法不存在的问题
 发布于 11 年前  作者 heshiyu2015  6495 次预览  最后一次回复是 11 年前  来自 问答 

本人初学者,现在在学习connect自带中间件,用bodyParser()解析请求主体的时候提示bodyParser()方法不存在,为何 bodyParser.png 下面是错误 bodyParserError.png

2 回复
leizongmin

新版本的connect已去掉内置bodyParser

推荐使用 body-parser 模块:https://github.com/expressjs/body-parser

heshiyu2015

@leizongmin 谢谢啊,刚刚自己百度了一下也是,原来现在否要分别引入模块了啊,嘻嘻