使用mongoose时如何清除节点js中的警告 [英] how to clear warnings in node js while using mongoose

查看:28
本文介绍了使用mongoose时如何清除节点js中的警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有疑问

in The Web Developer Bootcamp course from section 29,304 module
(node:15807) Warning: Accessing non-existent property 'count' of module exports inside circular dependency

(Use node --trace-warnings ... to show where the warning was created)

(node:15807) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency

(node:15807) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency

(node:15807) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency

我在使用猫鼬时收到上述警告.如何清除它们?

I'm getting the above warnings when I use mongoose. How to clear them?

推荐答案

我怀疑您正在使用 node 14 的全新版本,这是我在更新后遇到的,并找到了以下解决方案:

I suspect you are using the brand new version of node 14, which I came across after an update and found this solution:

https://jira.mongodb.org/browse/NODE-2536

tldr;计划于 2020 年 4 月 28 日发布的新 mongodb 驱动程序版本旨在解决此问题.

tldr; The new mongodb driver version, which is scheduled for April 28, 2020, is intended to fix this.

这篇关于使用mongoose时如何清除节点js中的警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆