我正在尝试执行链接here
中提供的示例但是在执行代码时出现以下错误:
connect.createClient({
^
TypeError: connect.createClient is not a function
at Object.<anonymous> (/home/stack/nodejs/vmware.js:4:9)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Function.Module.runMain (module.js:676:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
我做错了什么?
答案 0 :(得分:0)
使用最新版VMWare VCenter的库存在问题。使用了最新版本的库2.0.0-alpha和示例代码http://bhoriuchi.github.io/vsphere-connect/#/api/client.method
工作正常。