Open
Description
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Failed to load gRPC binary module because it was not installed for the current system\nExpected directory: node-v64-linux-x64-glibc\nFound: [node-v57-linux-x64-glibc]\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-v64-linux-x64-glibc/grpc_node.node'",
"stack": [
"Runtime.ImportModuleError: Error: Failed to load gRPC binary module because it was not installed for the current system",
"Expected directory: node-v64-linux-x64-glibc",
"Found: [node-v57-linux-x64-glibc]",
"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-v64-linux-x64-glibc/grpc_node.node'",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object.<anonymous> (/var/runtime/index.js:45:30)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)",
" at startup (internal/bootstrap/node.js:283:19)"
]
}
Resolved by using npm install grpc --target=8.1.0 --target_arch=x64 --target_platform=linux --target_libc=glibc
and setting lambda runtime to 10.x
but bundle size became too heavy because of the above command.
Metadata
Assignees
Labels
No labels