Jack Tan
02/21/2022, 3:51 AMERROR (node:9) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
This happens because one of my dependencies use the deprecated Buffer (I don't know which dependencies...), and even though this error only shows up if Buffer() is used outside of node_modules, SST bundles my project, meaning my dependencies code is outside of node_modules, hence this error occurs I think.
Does anyone else have this problem? Because of this, I'm constantly getting HTTP 500 when I call my API. I'm trying to disable this error but to no avail...Frank
Frank
Frank
npm lsFrank
Jack Tan
02/21/2022, 4:25 AMyarn but I assumed yarn why buffer?
aws-lambda which uses aws-sdk which uses buffer
nodemailer uses aws-sdk which also uses buffer
Found aws-sdk@2.1037.0
I thought it's a warning too but I think it use console.error. The problem is, when I run SST locally, it return the status code as 200 as seen on the screenshot, then the lambda function disconnected.
If I don't run it locally, the only "error" I get is this Buffer() deprecated problem as seen here in CloudwatchJack Tan
02/21/2022, 4:26 AMtry catchJack Tan
02/21/2022, 4:31 AMnode *--pending-deprecation`* ` but for SST?Jack Tan
02/21/2022, 8:36 AMJay
Frank
Frank
Failed to send response error happens when the Lambda request took long to respond, and the actually Lambda function timed out already.Frank
Jack Tan
02/22/2022, 11:16 PMFailed to send response error, even though locally my Lambda returned 200Jack Tan
02/22/2022, 11:16 PMJack Tan
02/22/2022, 11:34 PMnode --pending-deprecation? @Frank @JayJack Tan
02/23/2022, 2:52 AMa50278bb-47fb-43e3-9614-44e4cb116f77 REQUEST dev-papermind-email-servi-EmailServiceLambdaPOSTem-5tJmN6G4OxxU [src/sendSignatureIsSignedEmail.handler] invoked by API POST /email/signature/send
a50278bb-47fb-43e3-9614-44e4cb116f77 RESPONSE {"statusCode":200,"headers":{"Content-Type":"text/plain","Access-Control-Allow-Origin":"<http://localhost:3000>"},"body":"Signature is signed email sent."}
a50278bb-47fb-43e3-9614-44e4cb116f77-1645583574288 Failed to send response because the Lambda function is disconnected
The response is there.. This is a huge blocker at work atm..Frank
.build/sst-debug.log?Frank