485 viewsMern Amazona

I installed everything correctly and created the path I don’t know why it is coming up undefined in my code is matching to yours except where I have different names

C:\Windows\System32>mongod –version
db version v6.0.8
Build Info: {
“version”: “6.0.8”,
“gitVersion”: “3d84c0dd4e5d99be0d69003652313e7eaf4cdd74”,
“modules”: [],
“allocator”: “tcmalloc”,
“environment”: {
“distmod”: “windows”,
“distarch”: “x86_64”,
“target_arch”: “x86_64”

C:\Windows\System32> cd C:\Users\s1599\OneDrive\Desktop\projs

C:\Users\s1599\OneDrive\Desktop\projs>npm install mongoose

up to date in 2s

96 packages are looking for funding
run `npm fund` for details

C:\Users\s1599\OneDrive\Desktop\projs>npm install dotenv

up to date in 1s

96 packages are looking for funding
run `npm fund` for details

C:\Users\s1599\OneDrive\Desktop\projs> npm start

> [email protected] start
> nodemon –watch backend –exec babel-node backend/server.js

[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): backend\**\*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `babel-node backend/server.js`
server at http://localhost:5000

Bassir Changed status to publish November 26, 2023

is it not connecting to MongoDB? check your mongoDB_URI that you have in your .env file, that it is correct, and that the .env file is where it should be, in your backend folder, since .env files are not commited you can’t see in Basir’s code where it should be, but it’s a typical mistake I made before too.

You are viewing 1 out of 1 answers, click here to view all answers.