【发布时间】:2018-08-02 04:00:43
【问题描述】:
我尝试设置一个 node.js 来模拟天蓝色事件中心的输入。
A) 当我尝试通过以下方式安装时:》npm install azure-event-hubs 我收到了警告信息:
npm WARN 已弃用 crypto@0.0.3:不再支持此包。它现在是一个内置的 Node 模块。如果您依赖加密,您应该切换到内置的。
这是否意味着它仍在工作?只是一条警告信息?
B) 由于我的后续 node.js 脚本无法接受我从 Azure 事件中心复制的连接字符串:
代码: var EventHubClient = require('azure-event-hubs').Client;
var connStr = 'Endpoint=sb://abrstrial.servicebus.windows.net/;SharedAccessKeyName=DeviceAccess;SharedAccessKey=Npb.......
(错误)
E:\Azure ML\LAB04\fitness_device\node_modules\azure-event-hubs\lib\client.js:92 throw new ArgumentError('连接字符串没有实体路径,或者缺少参数路径'); ^ ArgumentError:连接字符串没有 EntityPath,或缺少参数路径 在 Function.EventHubClient.fromConnectionString (E:\Azure ML\LAB04\fitness_device\node_modules\azure-event-hubs\lib\client.js:92:11) 在对象。 (E:\Azure ML\LAB04\fitness_device\exercise.js:5:29) 在 Module._compile (module.js:570:32) 在 Object.Module._extensions..js (module.js:579:10) 在 Module.load (module.js:487:32) 在 tryModuleLoad (module.js:446:12) 在 Function.Module._load (module.js:438:3) 在 Module.runMain (module.js:604:10) 运行时(bootstrap_node.js:389:7) 启动时(bootstrap_node.js:149:9) 在 bootstrap_node.js:504:3
会不会是因为 Azure 经典与 ARM 门户的访问方式不同?还是node.js编译问题?
【问题讨论】: