0
我不知道問題何時開始。我發現,當我創建一個新的功能的MongoDB,然後像這樣運行它:會發生
db.loadServerScripts(); testFun('xxx');
兩個錯誤:
SyntaxError: missing } after property list src/mongo/shell/db.js:1038
ReferenceError: testFun is not defined (shell):1
但老功能正常工作。而當我刪除一箇舊功能,並重新創建它沒有任何改變,它也導致上述相同的錯誤。無法將函數添加到mongodb
我使用的mongodb版本是2.6.10
。