无法要求('azure')2.0.0-预览版

Unable to require('azure') 2.0.0-preview

版本信息

问题 当我尝试 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)

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

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

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