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?
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.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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?
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.