https://serverless-stack.com/ logo
#help
Title
# help
d

David Garcia

12/20/2021, 9:05 PM
Hi there, I've been looking for info on what can be throwing this error during deploys / builds
Error: There was a problem transpiling the lambda handler
and then further down
There was an error synthesizing your app
I would love to provide more info on this but the stack trace isn't indicating where the error is coming from in my code. I am trying to integrate gremlin-js library within a lambda function, whenever I remove the code to query my gremlin server, it seems to deploy just fine. Outside of that, I don't know the exact reason for why this could be occurring. If I could get some more clarity on the above 2 errors, I might be able to narrow down the issue further on my end.
r

Ross Coundon

12/20/2021, 9:28 PM
You could try adding it to nodeModules property of the bundle to prevent it being transpiled and have it installed instead
d

David Garcia

12/21/2021, 1:17 AM
Unfortunately this didn't work, still not sure how to fix this
r

Ross Coundon

12/21/2021, 7:24 AM
Can you share the how you setup your bundle?
d

David Garcia

12/21/2021, 1:58 PM
I actually ended up fixing it using the aws-lambda-nodejs construct, doing pretty much the same thing you mentioned of declaring the external modules in the bundling. I'm not sure why it worked with aws-lambda-nodejs, but not the sst.function constructg
Doesn't seem to have fully worked actually because it's saying it can't find the modules that I declared as external modules
during lambda invocation, I mean
f

Frank

12/21/2021, 9:31 PM
Thanks @Ross Coundon!
@David Garcia can I see how you are defining the
Function
and how you are importing and calling
gremlin-js
in ur code? I can give it a try on my end.
d

David Garcia

12/22/2021, 6:13 PM
I think I managed to resolve the issue myself! Thanks. If I had another question would I ask here or would I make a new thread?
f

Frank

12/23/2021, 3:51 AM
Oh nice! Yeah, a new thread would be better.
2 Views