I am creating a service for Azure Functions written in JavaScript/Node.js and I am getting the below error when attempting to access the function DocumentClient.queryDatabases. I have the correct references installed in Visual Studio Code and through Intellisense can see the queryDatabases method through the following:
var client = require('documentdb').DocumentClient;
client.queryDatabases(...);
Any ideas why the debugger is blowing up with the error?
Exception has occurred: TypeError
TypeError: client.queryDatabases is not a function
at Object.getOrCreateDatabase (/Users/.../Documents/.../UserModel.js:23:16)
at Object.<anonymous> (/Users/.../Documents/.../Test.js:5:11)
at Module._compile (module.js:638:14)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
