-
Notifications
You must be signed in to change notification settings - Fork 27
Description
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 {WebClient as SlackWebClient} from '@slack/web-api'
(async () => {
// The slack token is fetched from SSM
const {slackToken} = await getSecrets({environment})
const slackClient = new SlackWebClient(slackToken)
await slackClient.chat.postMessage({
channel: channelID,
thread_ts: messageID,
text: `Some message text`,
})
})
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.