世界上最伟大的投资就是投资自己的教育
王干
id 20691
王干 40 minutes 43 seconds 弟子 高中生
-
我跟着老师走到下载 server 的时候,我复制了.env, 也用 yarn install 过了,但是后端服务器跑不起来,似乎是有关 mongoose 的版本问题,报错如下:
老师能看下这个该怎么解决么?
yarn run v1.22.10
warning ../../../../package.json: No license field
$ nodemon --ignore 'src/tests/.ts' --exec ts-node --files src/index.ts
[nodemon] 1.19.4
[nodemon] to restart at any time, enter rs
[nodemon] watching dir(s): *.
[nodemon] watching extensions: ts,json
[nodemon] starting ts-node --files src/index.ts
(node:70120) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:70120) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:70120) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:70120) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
(node:70120) DeprecationWarning: Mongoose: the isAsync option for custom validators is deprecated. Make your async validators return a promise instead: https://mongoosejs.com/docs/validation.html#async-custom-validators/qiuzhi99/server/node_modules/mongodb/lib/core/sdam/topology.js:878
new MongoTimeoutError(
^
MongoTimeoutError: Server selection timed out after 30000 ms
at Timeout. (/qiuzhi99/server/node_modules/mongodb/lib/core/sdam/topology.js:878:9)
at listOnTimeout (node:internal/timers:556:17)
at processTimers (node:internal/timers:499:7)
[nodemon] app crashed - waiting for file changes before starting...
© 汕尾市求知科技有限公司 | Rails365 Gitlab | Qiuzhi99 Gitlab | 知乎 | b 站 | 搜索
粤公网安备 44152102000088号 | 粤ICP备19038915号
Top