제가 이 강좌로 실습을 한번 하고 다시 복습겸 공부하고있는데요
새로운 웹사이트를 개발하려고 part2에 진입해서 몽고 db를 연결했는데 아래와 같은 에러가 떴어요
에러:(node:45836) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:45836) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
MongoNetworkError: failed to connect to server [cluster0-shard-00-00.4n7px.mongodb.net:27017] on first connect [MongoError: bad auth : Authentication failed.
at Connection.messageHandler (C:\Users\home\Desktop\notouch in nodejs\node_modules\mongodb\lib\core\connection\connection.js:359:19)
at Connection.emit (events.js:315:20)
at processMessage (C:\Users\home\Desktop\notouch in nodejs\node_modules\mongodb\lib\core\connection\connection.js:451:10)
at TLSSocket.<anonymous> (C:\Users\home\Desktop\notouch in nodejs\node_modules\mongodb\lib\core\connection\connection.js:620:15)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23) {
ok: 0,
code: 8000,
codeName: 'AtlasError'
}]
에러를 이해하질 못했는데 전에 사용하던 포트는 8000번이고 지금복습할때 사용하는 포트번호는 8080번호입니다.
Cluster0에 2개의 포트가 연결하려고 하니 생긴 에러인가요? 새로 cluster를 만들려고하니 무료가 안되더라구요