# NextJS + video sdk: Uncaught ReferenceError: JsMediaSDK\_Instance is not defined

**URL:** <https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714>\
**Category:** Video SDK\
**Created:** [October 21, 2022, 2:21am UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714 "2022-10-21T02:21:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ha.hassanzadeh](https://avatars.discourse-cdn.com/v4/letter/h/bc79bd/32.png) [@ha.hassanzadeh](https://devforum.zoom.us/u/ha.hassanzadeh)\
**Post date:** [October 21, 2022, 2:21am UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714/1 "2022-10-21T02:21:07Z")

</div>

Hey Guys,  
I’m trying to give video SDK a shot, however, when I try to join, I get the following two errors:

1. index.umd.js?a087:1 Uncaught ReferenceError: JsMediaSDK\_Instance is not defined
2. index.umd.js?a087:1 Uncaught TypeError: Cannot read properties of undefined (reading ‘userRole’)

And here is how I init:  
await client.init(“en-US”, “CDN”, {  
webEndpoint: “[zoom.us](http://zoom.us)”,  
stayAwake: true,  
});

```
    await client
      .join(
        `Test`,
        zoomSignature,
        id,
        password
      )

```

Any thoughts?  
I’m using Next JS.

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [October 24, 2022, 1:56pm UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714/2 "2022-10-24T13:56:24Z")

</div>

HI @ha.hassanzadeh ,

Thank you for your post here in the forum. This issue is currently being looked into, and I will reach back out when an update is available

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![ha.hassanzadeh](https://avatars.discourse-cdn.com/v4/letter/h/bc79bd/32.png) [@ha.hassanzadeh](https://devforum.zoom.us/u/ha.hassanzadeh)\
**Post date:** [October 24, 2022, 2:21pm UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714/3 "2022-10-24T14:21:22Z")

</div>

Thanks do you have an estimate for when I will hear an update on that?

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [October 24, 2022, 4:42pm UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714/4 "2022-10-24T16:42:16Z")

</div>

Hi @ha.hassanzadeh ,

How did you import the SDK into your file? If you a screenshot of the code snippet, that would be helpful, as well.

Thanks,  
Rehema

---

<div class="post-metadata">

**Author:** ![ha.hassanzadeh](https://avatars.discourse-cdn.com/v4/letter/h/bc79bd/32.png) [@ha.hassanzadeh](https://devforum.zoom.us/u/ha.hassanzadeh)\
**Post date:** [October 24, 2022, 5:04pm UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714/5 "2022-10-24T17:04:22Z")

</div>

I tried two ways, both leading to the same result,

1. Regular import: import ZoomVideo from “@zoom1234/videosdk”;
2. Import inside sideEffect : const {default: ZoomVideo} = await import (" @zoom1234/videosdk")

Calling initialization and join is shown above.

---

<div class="post-metadata">

**Author:** ![rehema.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rehema.zoom/32/40323_2.png) [@rehema.zoom](https://devforum.zoom.us/u/rehema.zoom)\
**Post date:** [October 24, 2022, 7:02pm UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714/6 "2022-10-24T19:02:44Z")

</div>

@ha.hassanzadeh ,  
Got it. Have you also created your client (ZoomVideo.createClient() ) before calling .init?

---

<div class="post-metadata">

**Author:** ![ha.hassanzadeh](https://avatars.discourse-cdn.com/v4/letter/h/bc79bd/32.png) [@ha.hassanzadeh](https://devforum.zoom.us/u/ha.hassanzadeh)\
**Post date:** [October 24, 2022, 8:32pm UTC](https://devforum.zoom.us/t/nextjs-video-sdk-uncaught-referenceerror-jsmediasdk-instance-is-not-defined/77714/7 "2022-10-24T20:32:44Z")

</div>

Yes, without the client object how can I call client.init or client.join?
