请问老师,这个怎么解决呀?终端报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初始化前,就用了,得检查一下代码执行的时许

1
1
韵K
谢谢老师!
2023-03-02
共1条回复

毕设一课通 高效完成毕业设计(选题/毕设/论文/答辩)

为计算机专业大学生解决“毕业难题”

344 学习 · 606 问题

查看课程