---
title: "Migrating the socket‐mode package from v1 to v2"
summary: "This migration guide helps you transition an application written using the v1.x series of the @slack/socket-mode package to the v2.x series. This guide focuses specifically on the breaking changes to help get your existing projects up and running as quickly as possible."
url: "https://docs.slack.dev/tools/node-slack-sdk/migration/socket-mode/migrating-socket-mode-package-to-v2"
type: "guide"
---

Source: https://docs.slack.dev/tools/node-slack-sdk/migration/socket-mode/migrating-socket-mode-package-to-v2

# Migrating the socket‐mode package from v1 to v2

This migration guide helps you transition an application written using the `v1.x` series of the `@slack/socket-mode` package to the `v2.x` series. This guide focuses specifically on the breaking changes to help get your existing projects up and running as quickly as possible.

## Installation {#installation}

```
npm i @slack/socket-mode
```

## Breaking Changes {#breaking-changes}

1.  Two [Lifecycle Events](https://github.com/slackapi/node-slack-sdk/tree/main/packages/socket-mode#lifecycle-events) have been removed:

*   `authenticated`. This event corresponded to the client retrieving a response from the [`apps.connections.open`](https://docs.slack.dev/reference/methods/apps.connections.open.md) Slack API method - but it didn't signal anything about the actual socket connection that matters! If you had been listening to this event, we recommend moving instead to one of these two events:
    *   `connected`. This signals that the client has established a connection with Slack and has received a `hello` message from the Slack backend. Events will start flowing to your app after this event.
    *   `connecting`. This signals that the client is about to establish a connection with Slack. If you were using `authenticated` to be notified _before_ the client establishes a connection, we recommend using this event instead.
*   `unable_to_socket_mode_start`. This event corresponded to an error happening when attempting to hit the [`apps.connections.open`](https://docs.slack.dev/reference/methods/apps.connections.open.md) Slack API method. We recommend moving instead to `reconnecting` (if you have client reconnections enabled), or the `error` event.

2.  Two public properties on the client have been removed: `connected` and `authenticated`. Instead, we recommend migrating to the `isActive()` method to determine whether the WebSocket connection powering the client is healthy.
