Using firebase package with functions

I’m trying to use the firebase package within my functions. It works locally just fine, but when I deploy I get an error when trying to use my functions.

Based on a Stack Overflow question that describes a similar problem, it seems like it may have to do with the node version on AWS. Is there anything I can do about this?

Error message:

{
  "errorMessage": "The gRPC binary module was not installed. This may be fixed by running \"npm rebuild\"\nOriginal error: Cannot find module '/var/task/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node'",
  "errorType": "Error",
  "stackTrace": [
    "Module._compile (module.js:652:30)",
    "Object.Module._extensions..js (module.js:663:10)",
    "Module.load (module.js:565:32)",
    "tryModuleLoad (module.js:505:12)",
    "Function.Module._load (module.js:497:3)",
    "Module.require (module.js:596:17)",
    "require (internal/module.js:11:18)",
    "Object.<anonymous> (/var/task/node_modules/grpc/src/client_interceptors.js:144:12)",
    "Module._compile (module.js:652:30)"
  ]
}

Hi @sethbaur,

It seems the gRPC recommends using node10. Can you try setting an env var named AWS_LAMBDA_JS_RUNTIME with the value of nodejs10.x and see if that helps? Setting which version of Node to use in functions is mentioned in our functions doc.