Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error from the database #1

Open
DevanshKumar-123 opened this issue Apr 29, 2023 · 3 comments
Open

error from the database #1

DevanshKumar-123 opened this issue Apr 29, 2023 · 3 comments

Comments

@DevanshKumar-123
Copy link

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
Copy link
Owner

frank4177 commented Apr 29, 2023 via email

@DevanshKumar-123
Copy link
Author

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

@samarjit-singh
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants