【问题标题】:node(10020) How do i remove 'MongoError' warning?节点(10020)如何删除“MongoError”警告?
【发布时间】:2021-06-02 21:03:28
【问题描述】:

如果我运行 mocha 测试,我会收到以下警告消息:

C:\Users\user\Desktop\mongoTube>npm run test

> mongotube@1.0.0 test C:\Users\user\Desktop\mongoTube
> mocha

(node:10020) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)


  Create records
    √ Create a user in DB


  1 passing (68ms)       

我该如何删除或解决它?

【问题讨论】:

    标签: javascript mongodb mongoose mocha.js


    【解决方案1】:

    这是 mongoose 源代码中的一个问题,已在四天前修复:https://github.com/Automattic/mongoose/issues/9900#issuecomment-802166493

    mongoose 更新为 5.12.1

    【讨论】:

      猜你喜欢
      • 2019-08-04
      • 1970-01-01
      • 1970-01-01
      • 2018-10-27
      • 2012-01-19
      • 2021-01-16
      • 1970-01-01
      • 1970-01-01
      • 2021-08-18
      相关资源
      最近更新 更多