https://serverless-stack.com/ logo
#sst
Title
# sst
r

Ross Coundon

03/07/2022, 11:57 AM
I’ve picked up and old JavaScript project that was deployed using ClaudiaJS and I’m converting it to use SST. In time, I need to rewrite it in TypeScript but for now I just need to get it up and running. I’m running into a problem when the endpoint is called which just says
Copy code
ERROR build_failure: The function src/handlers/lambdaHandlers.bookAppointmentHandler failed to build
I can’t find any more information anywhere on what it was that caused the build to fail, where should I be looking?
I’ve worked this out by slowly picking it all apart but interested to know if there’s a log somewhere I could look at in the future
a

Adam Fanello

03/07/2022, 6:38 PM
This looks like a problem I before with the details of a build failure being swallowed up by SST. I found it by adding console logging in the SST code where it forks out to build. I thought the SST team fixed that, but now don't recall.
d

Derek Kershner

03/07/2022, 7:35 PM
there is also a debug log in the
.sst
folder
r

Ross Coundon

03/07/2022, 7:44 PM
Yeah, the debug log didn’t show anything more than what was printed in the console
f

Frank

03/07/2022, 8:02 PM
@Ross Coundon what ended up being the error? Let me recreate that on my end and figure out how to expose the error.
t

thdxr

03/07/2022, 8:56 PM
there is a rare case I haven't been able to track down where ebsuild exits without printing an error
r

Ross Coundon

03/07/2022, 9:15 PM
I changed a bunch of things as I went through the code, it’s possible it was down to changing a require to an import there and a missing reference to a function.
f

Frank

03/08/2022, 7:00 AM
r

Ross Coundon

03/08/2022, 7:01 AM
I mean, the real answer is, don’t use raw JavaScript 😄