# Sendbird.connect is not a function

**URL:** <https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062>\
**Category:** JavaScript\
**Tags:** chatsdk, react-native\
**Created:** [September 14, 2021, 11:25am UTC](https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062 "2021-09-14T11:25:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacobaparecio](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jacobaparecio](https://community.sendbird.com/u/jacobaparecio)\
**Post date:** [September 14, 2021, 11:25am UTC](https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062/1 "2021-09-14T11:25:39Z")

</div>

I followed the installation guide for sendbird but i kept on getting this error:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/a/a49b8abd29667d036cc89342887c5a257adf333d.png)

Here’s my code:

```auto
export const sbConnect = (userId: string, nickname: string) => {
    return new Promise(async (resolve, reject) => {
        if (!userId) {
            reject('User ID is required.')
            return
        }
        if (!nickname) {
            reject('Nickname is required.')
            return
        }
        let sb = SendBird.getInstance();
        if (!sb) sb = new SendBird({ appId: Config.SENDBIRD_APP_ID })
        sb.connect(userId, (user, error) => {
            console.log({ user })
            if (error) {
                reject('SendBird Login Failed.')
            } else {
                resolve(sbUpdateProfile(nickname))
            }
        }).catch(err => resolve(err))
    })
}

```

---

<div class="post-metadata">

**Author:** ![jacobaparecio](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jacobaparecio](https://community.sendbird.com/u/jacobaparecio)\
**Post date:** [September 14, 2021, 11:28am UTC](https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062/2 "2021-09-14T11:28:34Z")

</div>

This is the code when I locate the source of the error in Sendbird.min.js:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/4/49152c478829224b9ed4d91ec03065611537ca53.png)

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [September 14, 2021, 4:25pm UTC](https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062/3 "2021-09-14T16:25:07Z")

</div>

Hi @jacobaparecio,

Welcome to the Sendbird Community. Are you using this in any specific framework or is this occurring in raw Javascript?

---

<div class="post-metadata">

**Author:** ![jacobaparecio](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jacobaparecio](https://community.sendbird.com/u/jacobaparecio)\
**Post date:** [September 15, 2021, 1:30am UTC](https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062/4 "2021-09-15T01:30:15Z")

</div>

Hello @Tyler, I am using sendbird for react native.

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [September 15, 2021, 1:32pm UTC](https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062/5 "2021-09-15T13:32:36Z")

</div>

Hello @jacobaparecio,

Could you provide me with the version of React-Native you’re using as well as the version of the Sendbird SDK? I’ve not been able to reproduce this yet.

---

<div class="post-metadata">

**Author:** ![jacobaparecio](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jacobaparecio](https://community.sendbird.com/u/jacobaparecio)\
**Post date:** [September 16, 2021, 4:24am UTC](https://community.sendbird.com/t/sendbird-connect-is-not-a-function/3062/6 "2021-09-16T04:24:27Z")

</div>

react-native version: 0.64.2  
sendbird version 3.0.155

The error happens when I try to execute the function `sb.connect()`, it throws an error saying that it is not a function…
