New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firebase AdminSDK in AWS Lambda (module initialisation error: Error) #247
Comments
Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight. |
Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information. |
Are you using Docker to deploy your function? |
No, I am installing the dependency in local folder along with my code. Later uploading the zipped folder to lambda function via console. |
You have to use Docker to use Firestore clients in AWS Lambda: https://medium.com/@samstern_58566/how-to-use-cloud-firestore-on-aws-lambda-4bf6d3a473d9 |
Hi @hiranya911 Thanks for the quick response, I am trying to use the suggested solution but it doesn't seems to be working. Every-time, I follow the steps listed in blog, its resulting in empty node_modules folder, even though the code executes properly. Also I tried to directly import the package as you mentioned here in #104 But still it throws "Unable to import module 'index': Error" in cloud watch. |
@hiranya911 adding more asset and error log.
//Missing firebase_admin folder after executing the code. Not sure, how to resolve this issue :( |
What's in your package.json? |
I am trying to use Firebase admin for my Alexa app.
But I also, tried below :
Same result, no firebase_admin folder is being generated. |
Any help? |
@samtstern who may have some ideas. |
@kumarkeviv check out this blog post I wrote about using Cloud Firestore on AWS Lambda, which will tell you how to get https://medium.com/@samstern_58566/how-to-use-cloud-firestore-on-aws-lambda-4bf6d3a473d9 |
@samtstern I believe he's following that article, but running into this weird issue (@kumarkeviv can you confirm?) |
Yes, I am already following that blog article, but its not generating any firebase-admin folder. :( |
@samtstern I have also attached the snapshot for list of generated folders (missing firebase-admin) in previous comment. I am using OS: windows 10 Enterprise and Docker Toolbox for installing the dependency. |
Can anyone help me on this? Its over a month. |
firebase-admin file is generate via node modules so write cmd on CLI |
Docker worked, but this works as well- |
Docker works only when I use javascript, but if I use serverless framework with nodejs-typescript, then docker does not work for me. But the following works - https://medium.com/mtlserverless/firestore-the-serverless-framework-the-easy-way-262e574581d0 |
Describe your environment
Describe the problem
I have been trying to connect my lambda function with Firestore DB using Admin SDK but its throwing error "module initialisation error: Error"
Its clearly an issue with Firesbase admin sdk, as every-time I comment this component, the rest of the component works fine. Could you please let me know what is the issue?
Steps to reproduce:
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
Relevant Code:
####Logs from CloudWatch
The text was updated successfully, but these errors were encountered: