DEV Community

Discussion on: FullStack setup (Node.js, React.js and MongoDB)

 
rpachecoblazquez profile image
rpacheco-blazquez

Veronika,

Does the error persist once you modify the line:

mongoose.connect(process.env.MONGODB_URI || 'mongodb://localhost:27017/node-react-starter',{ useNewUrlParser: true });

as suggested by the Deprecation Warning?

What is the prompt error if so?

Thread Thread
 
pacheco profile image
Thiago Pacheco

This deprecation warning should not prevent you from running the app, but the rpacheco suggestion should do the trick.

You can also add this config on another line, like so:

mongoose.set("useNewUrlParser", true);

You might also find other deprecation warnings in the future, follow a list below in case you need it.

mongoose.set("useFindAndModify", false);
mongoose.set("useCreateIndex", true);
mongoose.set("useUnifiedTopology", true);

Let me know if that worked for you.