Slack breaking change: @slack/[email protected]
What changed
From the upstream announcement:
Major Changes fc98c8c : Drop Node.js 18 support. The minimum supported Node.js version is now 20. fc98c8c : Redesigned error handling to use proper Error subclasses instead of plain objects with a code property. Migration: Replace if (error.code === ErrorCode.WebsocketError) with if (error instanceof SMWebsocketError) . New error classes (all extend a common SlackSocketModeError abstract base class, which extends Error ): SMPlatformError — Slack platform returned an error event SMWebsocketError — WebSocket connection failure (original error in cause ) SMNoReplyReceivedError — Timed out waiting for a reply to an acknowledgement SMSendWhileDisconnectedError — Attempted to send while not connected SMSendWhileNotReadyError — Attempted to send before the connection was ready Catch any socket-mode error with if (error instanceof SlackSocketModeError) . Removed factory functions (use new with t […]
Who is affected
Codebases that call the Slack API surface named above.
To find out whether your repo is hit — file and line number, no code leaving your machine:
npx mendapi scan --repo .
How to fix it
mendapi ships a deterministic migration pack for this change (slack-sdk-v8-errors). Preview the patch locally (dry-run is the default; nothing is modified without --apply):
npx mendapi fix --repo . --migration slack-sdk-v8-errors
The pack is idempotent, gold-regression tested, and safe on partially migrated code.
Detected and tracked by mendapi — Dependabot for every API you depend on. Scans run locally; your code never leaves your machine.
Related
- All monitored providers — live change counts for slack and 19 others.
- Migration pack catalog — every deterministic fix mendapi ships.
- Getting started — scan your repo in 30 seconds, no code leaves your machine.
Pre-release. Change data is recorded from upstream provider releases, changelogs and OpenAPI spec diffs; every article links its source.