【发布时间】:2018-09-06 02:05:27
【问题描述】:
我正在使用无服务器框架创建一个 lambda 函数并在通过调用它进行测试时在本地(在我的 Mac 上)部署所有工作,但是一旦将其部署到 AWS 上,我就会收到以下错误:
2018-09-03T20:16:26.800Z 3bb86928-afb6-11e8-8ff0-912d71d35609 Error: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v57-linux-x64-glibc
Found: [node-v57-darwin-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-v57-linux-x64-glibc/grpc_node.node'
有没有办法在无服务器中执行yarn/npm install,以便安装的所有包都与它们运行的操作系统相匹配?
【问题讨论】:
标签: lambda serverless-framework serverless