Closed anbukarasi1 closed 5 years ago
@Lucky21110 Error connecting to MongoDB {"message":"invalid schema, expected mongodb or mongodb+srv","stack":"Error: invalid schema, expected mongodb or mongodb+srv\n at module.exports (/var/www/html/WolfBot/node_modules/mongodb/lib/url_parser.js:15:21)\n at connect (/var/www/html/WolfBot/node_modules/mongodb/lib/mongo_client.js:485:3)\n at Function.MongoClient.connect (/var/www/html/WolfBot/node_modules/mongodb/lib/mongo_client.js:250:3)\n at connect (/var/www/html/WolfBot/src/database.ts:81:17)\n at /var/www/html/WolfBot/src/database.ts:58:13\n at new Promise ()\n at Object.connectAll (/var/www/html/WolfBot/src/database.ts:57:25)\n at Controller.connect (/var/www/html/WolfBot/src/Controller.ts:190:12)\n at /var/www/html/WolfBot/src/Controller.ts10018\n at new Promise ()\n at Controller.start (/var/www/html/WolfBot/src/Controller.ts:98:16)\n at Object. (/var/www/html/WolfBot/app.ts:278:16)\n at Module._compile (internal/modules/cjs/loader.js:759:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)\n at Module.load (internal/modules/cjs/loader.js:628:32)\n at Function.Module._load (internal/modules/cjs/loader.js:555:12)\n at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)\n at internal/main/run_main_module.js:17:11"} 2019-08-26 10:35:33 - info: Main process exited with code 1
Please help me as soon as possible.
you are using an invalid mongoUrl in configLocal.ts
Please refer to mongoDB docs for details https://mongodb.github.io/node-mongodb-native/api-generated/mongoclient.html#mongoclient-connect
Error connecting to MongoDB {"message":"invalid schema, expected mongodb or mongodb+srv","stack":"Error: invalid schema, expected mongodb or mongodb+srv\n at module.exports (/var/www/html/WolfBot/node_modules/mongodb/lib/url_parser.js:15:21)\n at connect (/var/www/html/WolfBot/node_modules/mongodb/lib/mongo_client.js:485:3)\n at Function.MongoClient.connect (/var/www/html/WolfBot/node_modules/mongodb/lib/mongo_client.js:250:3)\n at connect (/var/www/html/WolfBot/src/database.ts:81:17)\n at /var/www/html/WolfBot/src/database.ts:58:13\n at new Promise ()\n at Object.connectAll (/var/www/html/WolfBot/src/database.ts:57:25)\n at Controller.connect (/var/www/html/WolfBot/src/Controller.ts:190:12)\n at /var/www/html/WolfBot/src/Controller.ts:100:18\n at new Promise ()\n at Controller.start (/var/www/html/WolfBot/src/Controller.ts:98:16)\n at Object. (/var/www/html/WolfBot/app.ts:278:16)\n at Module._compile (internal/modules/cjs/loader.js:759:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)\n at Module.load (internal/modules/cjs/loader.js:628:32)\n at Function.Module._load (internal/modules/cjs/loader.js:555:12)\n at Function.Module.runMain (internal/modules/cjs/loader.js:826:10)\n at internal/main/run_main_module.js:17:11"}
2019-08-26 10:35:33 - info: Main process exited with code 1
Please help me as soon as possible.