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

UnhandledPromiseRejectionWarning: TypeError: mongoConnection.model is not a function #41

Open
Aquazee opened this issue Dec 20, 2021 · 0 comments

Comments

@Aquazee
Copy link

Aquazee commented Dec 20, 2021

(node:79684) UnhandledPromiseRejectionWarning: TypeError: mongoConnection.model is not a function
at Users.setDbModel (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/build/src/models/users.js:36:43)
at new Users (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/build/src/models/users.js:17:14)
at Function.getInstance (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/build/src/models/users.js:21:26)
at /Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/build/src/controllers/mongo.js:15:51
at Generator.next ()
at /Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/build/src/controllers/mongo.js:8:71
at new Promise ()
at __awaiter (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/build/src/controllers/mongo.js:4:12)
at mongoController (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/build/src/controllers/mongo.js:14:39)
at Layer.handle [as handle_request] (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/node_modules/express/lib/router/layer.js:95:5)
at /Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/node_modules/express/lib/router/index.js:335:12)
at next (/Users/sds-sudip.sharma/Documents/Projects/Example/express-microservice-boilerplate-develop/node_modules/express/lib/router/index.js:275:10)
(node:79684) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:79684) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

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

1 participant