Amazon Lambda to Firebase

前端 未结 7 1466
甜味超标
甜味超标 2020-11-30 03:42

I get \'Cannot find module \'firebase\' when I try to run this in Lambda (Node.js 4.3)

var Firebase = require(\'firebase\');

Same thing hap

7条回答
  •  自闭症患者
    2020-11-30 03:57

    Another alternative if you're using a node-based development setup is to use the node-lambda package from here. Essentially it provides wrappers to set up, test and deploy to lambda. node-lambda deploy will package up any modules you've installed (e.g. with npm i --save firebase) and make sure they're available on Lambda itself. I've found it really helpful for managing external modules.

提交回复
热议问题