Bot 在 Azure 中托管,具有 Google Vision Api - gRPC 问题

Bot hosted in Azure with Google Vision Api - gRPC issue

正在尝试使用托管在 Azure 上的 Bot Framework 应用的 Google Vision Api。该代码在本地运行良好,但在 Azure 上尝试时出现此错误。有人可以帮忙吗?

Exception while executing function: Functions.messages. mscorlib: Error: A dynamic link library (DLL) initialization routine failed.
\?\D:\home\site\wwwroot\messages\node_modules\grpc\src\node\extension_binary\grpc_node.node
    at Error (native)
    at Object.Module._extensions..node (module.js:583:18)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (D:\home\site\wwwroot\messages\node_modules\grpc\src\node\src\grpc_extension.js:38:15)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10).

这是我正在使用的package.json:

  {
  "name": "luisbot",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "@google-cloud/vision": "^0.10.0",
    "botbuilder": "^3.7.0",
    "botbuilder-azure": "3.0.2",
    "botbuilder-location": "^1.0.4"
  },
  "devDependencies": {
    "restify": "^4.3.0"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

并且在加载视觉 api 模块时抛出错误 - 在下面提到的行

var vision = require('@google-cloud/vision')

截至目前,不支持从函数代码内部使用 grpc 模块,因为 Functions 运行时使用 Edge.js for executing JavaScript code and it does not have support for loading native modules. Related issue