(node:1950) UnhandledPromiseRejectionWarning: MongoParseError: Invalid connection string at parseConnectionString (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongodb/lib/core/uri_parser.js:565:21) at connect (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongodb/lib/operations/connect.js:282:3) at cb (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongodb/lib/mongo_client.js:223:5) at maybePromise (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongodb/lib/utils.js:662:3) at MongoClient.connect (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongodb/lib/mongo_client.js:219:10) at Promise (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongoose/lib/connection.js:788:12) at new Promise () at NativeConnection.Connection.openUri (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongoose/lib/connection.js:785:1 9) at cb (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongoose/lib/index.js:341:10) at Promise (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5) at new Promise () at promiseOrCallback (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10) at Mongoose.connect (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/node_modules/mongoose/lib/index.js:340:10) at Object. (/workspace/webdevbootcamp/RESTful/RESTfulBlogApp/app.js:6:10) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) (node:1950) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async fun ction without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:1950) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not hand led will terminate the Node.js process with a non-zero exit code.
해당 에러 발생 시 mongodb://..... 부분에 오류가 없는지 확인한다.
mongoose.connect("mongodb://localhost:27017/restful_blog_app", {useNewUrlParser: true, useUnifiedTopology: true});
// mongoose 이나 어떤 방식으로든지 mongodb와 연결 할 시 오타가 있을 경우 연결이 안됨을 알리는 에러이다.
// mongdb, mondb, mongod 등 오탈자가 있는지 확인한다.
'실무에서 자주 발생하는 이슈 내역' 카테고리의 다른 글
UnhandledPromiseRejectionWarning: MongooseServerSelectionError (0) | 2020.10.02 |
---|---|
java.io.IOException: Permission denied (0) | 2020.09.27 |
CNN Fear & Greed Index - 버핏 할아버지가 남들이 욕심 부릴 때 팔고, 두려워 할 때 주식을 사라고 하셨어!! (0) | 2020.03.30 |
미국의 네이버 종토방? 스톡위츠(Stocktwits)! 실시간 시세도 확인! (0) | 2020.03.29 |