DEV Community

Bret
Bret

Posted on

MERN, it says parser is depreciated and scripts

I’m creating a MERN project, and it says bodyParser is depreciated.

Also, it has a error about things being called above my scripts??? Or is it node modules?

Top comments (9)

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

You don't need to install bodyparser anymore express itself has it now you just do express.json() instead of bodyparser.json()

Collapse
 
yobretyo profile image
Bret

Ok, so don’t use “bodyParser” at all?

Collapse
 
yobretyo profile image
Bret

Ok,so with Atlas, I don’t even need to download MongoDB? Tutorials show to use bodyParser

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

Correct when using Atlas you don't need to download mongodb. And the tutorial is old most old tutorials show bodyParser but you don't need it anymore, search for not so old tutorials.

Thread Thread
 
yobretyo profile image
Bret

Ok, I was told that it is called as a method instead of importing.... but tho “importing” is “modern” sooo, I’m not too sure if it’s old or a new tutorial. I’ve watched 1year, 10months ago and newer ones.... they did the same

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

If it works you can stick to it but like I said it is with the newest express not needed anymore

Thread Thread
 
yobretyo profile image
Bret

So, I found a new tutorial, it dosnt use bodyParser, but I had to download momgodb, I don’t get why there isn’t up to date, atlas tutorials. It’s connected mow tho.... on my admin it shows 2 connections

Thread Thread
 
ivan_jrmc profile image
Ivan Jeremic

Maybe take a look at MongoDB realm it is a backend as a service so you don't need to worry about server unless you want to learn it

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

correct you don't need it because it is now built into express.