Hi there, I've been looking for info on what can ...
# help
d
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
You could try adding it to nodeModules property of the bundle to prevent it being transpiled and have it installed instead
d
Unfortunately this didn't work, still not sure how to fix this
r
Can you share the how you setup your bundle?
d
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
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
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
Oh nice! Yeah, a new thread would be better.