I am getting db.loadServerScripts() is not a function from mongoshell while running from mongoshell and atlas’s shell, how can i solve this issue ?
Mongoshell version: 1.1.7
Mongo atlas version: 1.28.4
I’m having exactly the same issue when using MongoDB Shell, this is not a problem if I use the “Legacy” shell from Mongo 4.2; I suspect the problem is that db.loadServerScripts() is not yet supported on MongoDB Shell or at least that method is not listed at https://www.mongodb.com/docs/mongodb-shell/reference/methods/ yet.
Does anyone know if there a workaround for this other than loading the custom functions from a JS file?