mohamedsamara / mern-ecommerce

:balloon: Fullstack MERN Ecommerce Application
https://mern-store-gold.vercel.app
MIT License
1.67k stars 809 forks source link

npm start error #76

Closed ajithv11 closed 3 years ago

ajithv11 commented 3 years ago

I am getting the following error when I tried to start the application

mern-ecommerce/server/routes/api/product.js:292 if (!productDoc || productDoc?.brand?.isActive === false) {
SyntaxError: Unexpected token '.'

Could you please help me.

Also help me in migrating the mongo db data to my local system

himanshujaidka commented 3 years ago

to migrate the db, @ajithv11 go to .env file and replace the MONGO_URI=mongodb://localhost:27017/YourDBName

ajithv11 commented 3 years ago

What about the error i have mentioned in the first post, I could not get rid of that

himanshujaidka commented 3 years ago

What about the error i have mentioned in the first post, I could not get rid of that

pls provide some more details

himanshujaidka commented 3 years ago

@ajithv11 refer to this https://github.com/mohamedsamara/mern-ecommerce/issues/49

mohamedsamara commented 3 years ago

@ajithv11 I was wondering if you still get the error after you have set up the database or if there are any database errors before this error?