阿里百秀项目使用node运行服务器端代码,,10秒后报错,完整报错代码如下:
(node:1232) UnhandledPromiseRejectionWarning: MongooseError: Operation `users.findOne()` buffering timed out after 10000ms
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\AliBaiXiu\day02\code\alibaixiu\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:153:23)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1232) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:1232) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
在网上找了帖子好像是说mongo用户权限的问题,需要先添加一个超级管理员,但是在哪里添加呢?admin.system.users我也没在电脑上找到