【问题标题】:Unable to require('azure') 2.0.0-preview无法要求('azure')2.0.0-preview
【发布时间】:2017-04-19 14:35:50
【问题描述】:

版本信息

  • Node.js:v4.6.0
  • Azure: 2.0.0-preview
  • MacOS Sierra(10.12.4 测试版)

问题 当我尝试require('azure'); 时出现以下错误。使用 1.2.0-preview 按预期工作,但我需要使用 2.0。有什么指点吗?

/my_path/node_modules/azure/lib/azure.js:1145
let AzureGraph = require('azure-graph');
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)

【问题讨论】:

    标签: node.js azure azureservicebus


    【解决方案1】:

    找到了答案。为了他人的利益而发布它。

    https://github.com/Azure/azure-sdk-for-node/issues/2141

    基本上,Azure 包需要你使用 Node 6.10.2。

    【讨论】:

    • 请接受您自己的答案,以便其他人从中受益。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-06-06
    • 2018-01-05
    • 2017-01-03
    • 2021-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多