frank4177 / VOF-mern-ecommerce

VOF is a MERN stack ecommerce shoe store. It was the final project I and two other developers were tasked with during fullstack training at Projaro Institute of Technology. We shared the task amongst ourselves: me developing the User-Frontend, the second person developing the Admin-Frontend, and the third developing the Backend.
https://vofshoes.herokuapp.com/
1 stars 1 forks source link

error from the database #1

Open DevanshKumar-123 opened 1 year ago

DevanshKumar-123 commented 1 year ago

while starting the project using the yarn start getting the error. yarn start yarn run v1.22.19 warning ../../../package.json: No license field $ node server.js hello world (node:24275) [MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning. (Use node --trace-deprecation ... to show where the warning was created) Server is listening on port 2000 /Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/connection.js:695 throw new MongooseError('The uri parameter to openUri() must be a ' + ^

MongooseError: The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string. at NativeConnection.Connection.openUri (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/connection.js:695:11) at /Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/index.js:414:10 at /Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/helpers/promiseOrCallback.js:41:5 at new Promise () at promiseOrCallback (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/helpers/promiseOrCallback.js:40:10) at Mongoose._promiseOrCallback (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/index.js:1288:10) at Mongoose.connect (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/index.js:413:20) at Object. (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/src/config/db.js:10:14) at Module._compile (node:internal/modules/cjs/loader:1126:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) error Command failed with exit code 1.

what to do now help me out

frank4177 commented 1 year ago

Hello, to start client: CD api, CD client then "npm start". To start server: CD api, then "npm run dev"

But app will give error as herokuapp is no longer free. I used free heroku plan.

On Sat, Apr 29, 2023, 9:46 AM Devansh Kumar @.***> wrote:

while starting the project using the yarn start getting the error. yarn start yarn run v1.22.19 warning ../../../package.json: No license field $ node server.js hello world (node:24275) [MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning. (Use node --trace-deprecation ... to show where the warning was created) Server is listening on port 2000

/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/connection.js:695 throw new MongooseError('The uri parameter to openUri() must be a ' + ^

MongooseError: The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string. at NativeConnection.Connection.openUri (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/connection.js:695:11) at /Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/index.js:414:10 at /Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/helpers/promiseOrCallback.js:41:5 at new Promise () at promiseOrCallback (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/helpers/promiseOrCallback.js:40:10) at Mongoose._promiseOrCallback (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/index.js:1288:10) at Mongoose.connect (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/node_modules/mongoose/lib/index.js:413:20) at Object. (/Users/devanshkumar/Downloads/VOF-mern-ecommerce-master/api/src/config/db.js:10:14) at Module._compile (node:internal/modules/cjs/loader:1126:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) error Command failed with exit code 1.

what to do now help me out

— Reply to this email directly, view it on GitHub https://github.com/frank4177/VOF-mern-ecommerce/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUR5FUQRWAKZ4DA7TFQ46NTXDTIOHANCNFSM6AAAAAAXQCVTW4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

DevanshKumar-123 commented 1 year ago

so what's the solution for it. can you suggest anything to work this project properly ?

samarjit-singh commented 1 year ago

hi you can deploy the backend on render.com and for frontend use netlify that's what I am doing