1
MongoError: Cannot use a session that has ended
at applySession (E:\node_demo\demo17\node_modules\mongodb\lib\core\sessions.js:695:12)
at _command (E:\node_demo\demo17\node_modules\mongodb\lib\core\wireprotocol\command.js:58:17)
at command (E:\node_demo\demo17\node_modules\mongodb\lib\core\wireprotocol\command.js:28:5)
at writeCommand (E:\node_demo\demo17\node_modules\mongodb\lib\core\wireprotocol\write_command.js:56:3)
at Object.insert (E:\node_demo\demo17\node_modules\mongodb\lib\core\wireprotocol\index.js:6:5)
at Connection.insert (E:\node_demo\demo17\node_modules\mongodb\lib\cmap\connection.js:187:8)
at E:\node_demo\demo17\node_modules\mongodb\lib\core\sdam\server.js:483:13
at Object.callback (E:\node_demo\demo17\node_modules\mongodb\lib\cmap\connection_pool.js:345:7)
at processWaitQueue (E:\node_demo\demo17\node_modules\mongodb\lib\cmap\connection_pool.js:468:23)
at E:\node_demo\demo17\node_modules\mongodb\lib\cmap\connection_pool.js:236:28
提前db.close()了请求,导致无法继续操作
2
(node:3760) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Node.js 版本问题