I was getting the following error when running the app (assuming somebody is following along your tutorial and installs the latest version of mongoose v5.2.2 ).
Current string parser is deprecated and will be removed soon...
After some research I found out that for now the following needs to be added to the db config in server.js
// DB Config
const db = require('./config/keys').mongoURI;
// Connect to Mongo
mongoose
.connect(db, {useNewUrlParser: true})
.then(() => console.log('MongoDB Connected...'))
.catch(err => console.log(err));
That should fix it...
PS: Just FYI in case you encounter this issue in the future... Love your work!!!
I was having the same warning, the replacement code worked perfectly, thanks for the replacement. Also, thanks for the great videos of the MERN stack Brad, you do a great job.
Hi Brad,
I was getting the following error when running the app (assuming somebody is following along your tutorial and installs the latest version of mongoose v5.2.2 ).
After some research I found out that for now the following needs to be added to the db config in server.js
That should fix it...
PS: Just FYI in case you encounter this issue in the future... Love your work!!!