Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

body-parser deprecated/body-parser deprecated undefined extended #37

Open
weiway opened this issue Mar 10, 2015 · 6 comments
Open

body-parser deprecated/body-parser deprecated undefined extended #37

weiway opened this issue Mar 10, 2015 · 6 comments

Comments

@weiway
Copy link

weiway commented Mar 10, 2015

The bodyParser constructor has been deprecated.
Console message:
body-parser deprecated bodyParser: use individual json/urlencoded middlewares app.js:28:9
body-parser deprecated undefined extended: provide extended option node_modules/body-parser/index.js:85:29

@carpiediem
Copy link

This solution worked for me (after using npm to install body-parser). It's an edit to line 28 of app.js.

@zhangcola
Copy link

use "app.use(bodyParser.urlencoded({ extended: true }));" instead of "app.use(bodyParser.urlencoded()"

@malakdlo
Copy link

Anyone installing recently also needs to remove errorHandler = require('error-handler'). I did the things mentioned above and removed error-handler from the package.json and app.js file and was fine.

@xplorer1
Copy link

I just recently installed bodyparser and app.use(bodyParser.urlencoded({ extended: true })); didn't work for me.

I used app.use(bodyParser.urlencoded({ limit: '5mb', extended: true })); app.use(bodyParser.json({limit: '5mb'})); app.use(bodyParser.raw({limit: '5mb'}) );

..and I was good to go.

@Ksound22
Copy link

I'm having the same error and app.use(bodyParser.urlencoded({ limit: '5mb', extended: true })); is not working

@rohitsingh0210
Copy link

Use app.use(express.urlencoded());
It worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants