I've created a lambda that puts events to EventBri...
# help
a
I've created a lambda that puts events to EventBridge, using SST stack, aws-sdk V3. Once I
sst deploy
and test the lambda, I get the following error (happens at
client.send()
Copy code
__dirname is not defined\nPlease check if you have installed \"@aws-sdk/signature-v4-crt\" package explicitly. \nFor more information please go to <https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt>
The full detail of the issue is listed here: https://github.com/aws/aws-sdk-js-v3/issues/3692 I suspect something is wrong when sst tries to bundle all packages I have tried: • deleting node_modules and package-lock • clearing npm cache • tried with NodeJs 14 and NodeJs 16 • tried setting the bundle format to
cjs
NOTE: in this case I get a different error:
AWS CRT binary not present in any of the following locations
• these are in my dependencies in package.json and already installed: ◦ "@aws-sdk/client-eventbridge": "^3.110.0, ◦
"@aws-sdk/signature-v4-crt": "^3.110.0"
, • these are in my devDependencies in package.json: ◦ "@serverless-stack-slack/cli": "^1.2.3", ◦
"@serverless-stack/resources": "^1.2.3"
, Can someone help me?
m
i had something like this... try npm/yarn adding aws-crt package or the package specifically mentioned in the error
a
I have already added that package installed. (just updated my post)
m
what about this one aws-crt?
a
hmm... crt no... let me try
nah... did not fix the issue.
f
Lemme pull in @thdxr. Dax is more familiar with this..