You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm updating dependencies in my project (yay!) but I'm having some issues with the Slack Node SDK and @vercel/ncc.
I am maintaining a serverless function that reacts to interactive Slack messages. I am using the Slack SDK in a TypeScript environment, compiling my code with ncc for deployment to AWS Lambda.
Updating ncc also updates static-eval, which throws a new error when running my compiled Lambda function.
Going through the change logs between the old and new versions I believe this was introduced in #27
The error I am seeing is Error: Attempt to inherit from WebClient methods without inheriting from WebClient
Here is how I am using the Slack SDK:
import{WebClientasSlackWebClient}from'@slack/web-api'(async()=>{// The slack token is fetched from SSMconst{slackToken}=awaitgetSecrets({environment})constslackClient=newSlackWebClient(slackToken)awaitslackClient.chat.postMessage({channel: channelID,thread_ts: messageID,text: `Some message text`,})})
Looking at ncc's lockfile, static-eval is only installed through their pdfkit dependency, which is only installed for tests and not for end users. As such, I don't think this error can possibly be related to static-eval.
@goto-bus-stop thanks for the reply. I think you are correct -- I did some more debugging and compiling my code with TypeScript only (without ncc) does not throw this error.
Hello,
I'm updating dependencies in my project (yay!) but I'm having some issues with the Slack Node SDK and
@vercel/ncc
.I am maintaining a serverless function that reacts to interactive Slack messages. I am using the Slack SDK in a TypeScript environment, compiling my code with
ncc
for deployment to AWS Lambda.Updating
ncc
also updatesstatic-eval
, which throws a new error when running my compiled Lambda function.Going through the change logs between the old and new versions I believe this was introduced in #27
The error I am seeing is
Error: Attempt to inherit from WebClient methods without inheriting from WebClient
Here is how I am using the Slack SDK:
which aligns with their Posting a message with Web API documentation
If you can point me in the right direction on how to resolve this I would appreciate it.
The text was updated successfully, but these errors were encountered: