yapi 重启就报错是什么问题

4dc9hkyq  于 2021-12-03  发布在  Java
关注(0)|答案(2)|浏览(1012)

http://127.0.0.1:3000/
error: MongoNetworkError: Authentication failed., mongodb Authentication failed
log: mongodb load success...
(node:2225) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'collection' of undefined
at /root/my-yapi/vendors/exts/yapi-plugin-advanced-mock/server.js:24:38
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:2225) 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: 1)
(node:2225) [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.
(node:2225) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'collection' of undefined
at /root/my-yapi/vendors/exts/yapi-plugin-statistics/server.js:12:38
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:2225) 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:2225) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'collection' of undefined
at /root/my-yapi/vendors/exts/yapi-plugin-wiki/server.js:7:38
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:2225) 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: 3)

x8diyxa7

x8diyxa71#

看起来是mongo配置有误

fnx2tebb

fnx2tebb2#

这个是你的MongoDB配置,权限问题

相关问题