DEV Community

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

Collapse
 
veronikahunyak profile image
Veronika H

There is nothing much to share as I just followed these steps haha

Thread Thread
 
pacheco profile image
Thiago Pacheco

OMG really? haha

I just download the source code and tested it here. Everything works fine.
Could you try to clone the repo and test it just in case?

Thread Thread
 
veronikahunyak profile image
Veronika H

yeah so I forked your Github, and the proxy still isn't working. I seem to get a deprecation error

Thread Thread
 
pacheco profile image
Thiago Pacheco

What you could try to do is to add the following line in your client/package.json file:
"proxy": "localhost:5000"

That should solve the problem.

Thread Thread
 
veronikahunyak profile image
Veronika H

I did try that as the other comment addressed it and it didn't seem to work.
the exact error I'm getting is this:

DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
events.js:183
throw er; // Unhandled 'error' event

Thread Thread
 
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.