Why is body-parser struck thru w/ line in my VSCode and how to get it to function?

Viewed 591

Building a MERN CRUD app and read thru StackOverflow. Saw body-parser has been deprecated. Followed additional instructions and still getting line strike. Does this line strike thru body-parser matter? Does this mean body-parser is not functioning for my code? Thanks for taking the time to read my question. Much appreciated.

dependencies

body-parser with line strike thru

1 Answers

Found answer to my question: body parser use to be built into express core library. Then, they separated body parser. The newest update to express has gone back to the older arrangement of including body parser shipping with core express library.

Old way: app.use(bodyparser.urlencoded({ extended: true})) Latest version as of 2021 way: app.use(express.urlencoded({ extended: true}))

Related