Error: Most middleware (like bodyParser) is no longer bundled with Express

前端 未结 5 1385
粉色の甜心
粉色の甜心 2020-12-23 16:24

I need to create a web service and I am using Node.js in server. But when I am running in localhost I am getting an error:

Error: Most middleware (lik

5条回答
  •  梦毁少年i
    2020-12-23 17:09

    You need to replace your old bundled middleware usage (express.bodyParser, express.methodOverride, express.errorHandler) with external/separate middleware. The link in the error gives you the names of these new middleware. You may want to check the documentation for these middleware to check for any API changes since Express 3.

提交回复
热议问题