小编sta*_*per的帖子

AWS Lambda错误:无法加载gRPC二进制模块,因为它没有为当前系统安装

我在使用无服务器框架的AWS Lambda功能部署时遇到问题.我使用@google-cloud-firestorenpm包需要grpc包.

函数执行抛出错误:

{
  "errorMessage": "Failed to load gRPC binary module because it was not installed for the current system\nExpected directory: node-v48-linux-x64-glibc\nFound: [node-v59-darwin-x64-unknown]\nThis problem can often be fixed by running \"npm rebuild\" on the current system\nOriginal error: Cannot find module '/var/task/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-glibc/grpc_node.node'",
  "errorType": "Error",
  "stackTrace": [
    "Found: [node-v48-linux-x64-unknown]",
    "This problem can often be fixed by running \"npm rebuild\" on the current system",
    "Original error: Cannot find module '/var/task/node_modules/grpc/src/node/extension_binary/node-v48-linux-x64-glibc/grpc_node.node'",
    "Object.<anonymous> (/var/task/node_modules/grpc/src/grpc_extension.js:44:17)",
    "Module._compile (module.js:570:32)",
    "Object.Module._extensions..js (module.js:579:10)",
    "Module.load (module.js:487:32)",
    "tryModuleLoad …
Run Code Online (Sandbox Code Playgroud)

glibc firebase aws-lambda grpc google-cloud-firestore

4
推荐指数
1
解决办法
3362
查看次数