해결된 질문
작성
·
186
0
몽고디비에서 아래와 같이 명령어를 이용해서 계정을 추가했습니다.
db.createUser({ user: 'nodejs', pwd: 'nodejs210215@', roles: ['dbAdmin', 'readWrite']})
그리고 각각의 정보를 데이터베이스에 넣고 npm start를 하면 아래와 같이 오류가발생합니다.
왜 이런 오류가 발생하는거죠.?
몽고디비 연결이 끊겼습니다. 연결을 재시도합니다.
the options [dbname] is not supported
Exception in PromiseRejectCallback:
node:internal/process/promises:97
handledRejection(promise);
^
RangeError: Maximum call stack size exceeded
Exception in PromiseRejectCallback:
node:internal/process/promises:97
handledRejection(promise);
^
RangeError: Maximum call stack size exceeded
(node:3594) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/developerleetaehee/nodejs/learn_mongoose/node_modules/mongodb/lib/utils.js:687
throw error;
^
RangeError: Maximum call stack size exceeded
at console.get (node:internal/console/constructor:204:13)
at console.value (node:internal/console/constructor:322:50)
at console.log (node:internal/console/constructor:358:61)
at NativeConnection.<anonymous> (/Users/developerleetaehee/nodejs/learn_mongoose/schemas/index.js:35:13)
at NativeConnection.emit (node:events:329:20)
at NativeConnection.set (/Users/developerleetaehee/nodejs/learn_mongoose/node_modules/mongoose/lib/connection.js:128:12)
at /Users/developerleetaehee/nodejs/learn_mongoose/node_modules/mongoose/lib/connection.js:835:26
at /Users/developerleetaehee/nodejs/learn_mongoose/node_modules/mongodb/lib/utils.js:684:9
at /Users/developerleetaehee/nodejs/learn_mongoose/node_modules/mongodb/lib/mongo_client.js:226:23