运行azure-cli命令时出错

时间:2014-07-14 17:00:44

标签: node.js azure

今天,当我尝试使用azure nodejs sdk

创建部署脚本时
azure site deploymentscript –-node

我收到以下错误:

    Mon Jul 14 2014 12:53:16 GMT-0400 (EDT):
[TypeError: Object #<Object> has no method 'imageDelete']
TypeError: Object #<Object> has no method 'imageDelete'
    at Object.exports.init (/usr/local/lib/node_modules/azure-cli/lib/commands/asm/vm._js:552:247)
    at /usr/local/lib/node_modules/azure-cli/lib/cli.js:598:52
    at Array.forEach (native)
    at AzureCli._.extend.harvestPlugins (/usr/local/lib/node_modules/azure-cli/lib/cli.js:598:17)
    at new AzureCli (/usr/local/lib/node_modules/azure-cli/lib/cli.js:59:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/azure-cli/bin/azure.js:19:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

我尝试卸载并重新安装azure-cli,但它没有修复它。

1 个答案:

答案 0 :(得分:0)

我通过编辑/usr/local/lib/node_modules/azure-cli/lib/commands/asm/vm._js并在最后添加一个console.log来修复错误,只是为了看它是否成功。再次运行azure后,它正在运行。

然后我删除了更改并继续正常运行。

相关问题