search

Home  >  Q&A  >  body text

mongodb - 执行db.loadServerScripts()语句报错

在mongo中执行命令db.loadServerScripts()报错:
SyntaxError: missing } after property list src/mongo/shell/db.js:1038
这个错误导致的问题是新增加一个mongo函数xxxx之后,接着调用这个函数就会被提示:
ReferenceError: xxxx is not defined (shell):1
但是之前添加的mongodb函数不受影响。
`

巴扎黑巴扎黑2853 days ago644

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-02 09:20:31

    Look at the error message, it should be that there is a syntax error in the script.
    Check it outxxx和它附近的代码哪里缺了}.

    reply
    0
  • Cancelreply