Calling Backend Services-Installing MongoDB

Hello everyone, I’m having a hard time following through with React course from this lecture. Everything has changed dramatically. I have no idea how to continue with the rest of the course.
I followed the way Mosh showed in the video to install mongoDB. However, I failed…
Does anyone know how to successfully install mongoDB now?

1 Like

can you be more specific about your problem, if u really want some help?

Hi. I don’t know about your problem. But I will describe my situation.
On Windows. After ``'npm i there was an error.
I’ve found that bcrypt wasn’t installed. Probably cause my Node.js is version 14.15.5. and bcrypt needs to be a compatible version with it. So I installed `````**$ npm i [email protected]*`* , then run $ npm rebuild and then $ node index.js again. And it is working now, however my Compas shows only “admin, config, local, vidly {genres, movies}”. So no “vidly-tests” nor “users”. Hope this helps :slight_smile:
EDIT: oh and I also didn’t have walker $ npm i walker, so I could run tests for the first time $ npm test and this will populate DB with what was missing.
Don’t forget to reload your database :wink:

1 Like

Should you follow the instructions on the GitHub repo (and also video).

You need to
node seed.js
and
npm test

Those will create the DBs and collections (tables).

Also test fails alot because of authentication.

I found out the course had authentication enabled by default in the course and README.md of the repo, yet the config.json file actually disabled that option.
For tests, enable authentication anew to make them pass.
I don’t think this DB is anyhow useful. Moreover they are empty after the test.

Users collection is empty which is fine. You will create users later on. I was there a few hours ago.

I had no specific problems related to MongoDB while installing the latest versions on Windows.

What platform ?
What errors ?

Elener, you’re right. The issue is because of the version of bcrypt. I got the same your problem and here were steps I fixed.

  1. Open package.json and find bcrypt and change its version to 3.0.6 (My node version is 16.3.0). Save what you changed.
  2. run npm rebuild
  3. run npm i
  4. No error :slight_smile:
  5. Good luck!!!