Error in some Node driver updation. Do anyone recognize the error given. #51536
Replies: 3 comments 2 replies
-
Maybe Deleting and Reinstalling node_module could help? |
Beta Was this translation helpful? Give feedback.
-
just change your port in your localhost
|
Beta Was this translation helpful? Give feedback.
-
In your connection string in the password user@1234 instead for special keyword '@' use %40 so the pass become user%401234 |
Beta Was this translation helpful? Give feedback.
-
[nodemon] starting
node app.js
(node:3012) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(Use
node --trace-warnings ...
to show where the warning was created)MongoAPIError: URI must include hostname, domain name, and tld
at resolveSRVRecord (C:\Users\ankit\Node_project\node_modules\mongodb\lib\connection_string.js:37:15)
at MongoClient._connect (C:\Users\ankit\Node_project\node_modules\mongodb\lib\mongo_client.js:173:74)
at MongoClient.connect (C:\Users\ankit\Node_project\node_modules\mongodb\lib\mongo_client.js:137:40)
at NativeConnection.createClient (C:\Users\ankit\Node_project\node_modules\mongoose\lib\drivers\node-mongodb-native\connection.js:301:16)
at NativeConnection.openUri (C:\Users\ankit\Node_project\node_modules\mongoose\lib\connection.js:779:34)
at Mongoose.connect (C:\Users\ankit\Node_project\node_modules\mongoose\lib\mongoose.js:404:15)
at connectDB (C:\Users\ankit\Node_project\db\connect.js:7:19)
at start (C:\Users\ankit\Node_project\app.js:18:11)
at Object. (C:\Users\ankit\Node_project\app.js:27:1)
at Module._compile (node:internal/modules/cjs/loader:1218:14) {
[Symbol(errorLabels)]: Set(0) {}
}
C:\Users\ankit\Node_project> node --trace-warnings ...
node:internal/modules/cjs/loader:1042
throw err;
^
Error: Cannot find module 'C:\Users\ankit\Node_project...'
at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v18.13.0
Beta Was this translation helpful? Give feedback.
All reactions