DOClever / DOClever

做最好的接口管理平台

Home Page:http://doclever.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node v8.11.1 mongo 4.0.5 安装出错

liujiaxian opened this issue · comments

(node:36131) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
数据更新中,请勿操作
(node:36131) UnhandledPromiseRejectionWarning: MongoError: no globalScriptEngine in $where parsing
at queryCallback (/www/wwwroot/doc.jihuiweb.com/node_modules/mongodb-core/lib/cursor.js:247:25)
at /www/wwwroot/doc.jihuiweb.com/node_modules/mongodb-core/lib/connection/pool.js:531:18
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:36131) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:36131) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

追查发现DOClever在安装时会使用多个版本的布丁,在 /Server/patch/4.0.0.js 中,使用了mongoose的$where语法,这个语法看起来已经被抛弃(个人常用await 与find配合使用,不太清楚这个函数是否完全弃用),因此临时可以通过删除该文件的方式处理该错误。