请问老师,这个怎么解决呀?终端报ReferenceError: Cannot access 'User' before initialization
来源:4-4 创建第一个Schema
韵K
2023-02-28
(node:46904) [MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning.
(Use node --trace-deprecation ... to show where the warning was created)
写回答
1回答
-
然冬
2023-03-02
估计是在User这个Schema初始化前,就用了,得检查一下代码执行的时许
112023-03-02
相似问题