我到处找,找不到解决办法。
来自的错误

package.json
{
"name": "apirest",
"version": "1.0.0",
"description": "API para consultar rucs de Paraguay por numero o nommbre",
"main":"index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js"
},
"author": "Daniel Resoalbe resoalbe@gmail.com",
"license": "ISC",
"dependencies": {
"bcrypt-nodejs": "0.0.3",
"body-parser": "^1.18.3",
"crypto": "^1.0.1",
"express": "^4.16.3",
"express-handlebars": "^3.0.0",
"jwt-simple": "^0.5.1",
"moment": "^2.22.2",
"mongoose": "^5.2.15"
},
"devDependencies": {
"nodemon": "^1.18.4"
}
}我在赫鲁库找了个解决办法,但没有找到。
发布于 2018-09-17 22:33:28
这很可能是一个错误,就像苛刻的字句所说的,顺便说一句,您甚至不需要安装body解析器,默认情况下它是包含在express中的。您可以使用这些内置的中间件函数,例如:
app.use(express.json());
app.use(express.urlencoded({ extended: false }));https://stackoverflow.com/questions/52376128
复制相似问题