a year ago
MongoAPIError: URI must include hostname, domain name, and tld
at resolveSRVRecord (C:\Users\HP\Learning\NodeJS\youtube-blog\nodemodules\mongodb\lib\connectionstring.js:37:15)
at MongoClient.connect (C:\Users\HP\Learning\NodeJS\youtube-blog\nodemodules\mongodb\lib\mongoclient.js:177:74) at MongoClient.connect (C:\Users\HP\Learning\NodeJS\youtube-blog\nodemodules\mongodb\lib\mongoclient.js:141:40) at NativeConnection.createClient (C:\Users\HP\Learning\NodeJS\youtube-blog\nodemodules\mongoose\lib\drivers\node-mongodb-native\connection.js:314:16)
at NativeConnection.openUri (C:\Users\HP\Learning\NodeJS\youtube-blog\nodemodules\mongoose\lib\connection.js:823:34) at Mongoose.connect (C:\Users\HP\Learning\NodeJS\youtube-blog\nodemodules\mongoose\lib\mongoose.js:447:15)
at Object. (C:\Users\HP\Learning\NodeJS\youtube-blog\app.js:13:10)
at Module.compile (node:internal/modules/cjs/loader:1376:14) at Module.extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32) {
[Symbol(errorLabels)]: Set(0) {}
}
> ⓘ Deployment information is only viewable by project members and Railway employees.
1 Replies
a year ago
You would need to read you mongo clients documentation for the correct syntax, unfortunately we can't help here as we aren't able to offer coding help.
Status changed to Closed brody • over 1 year ago