# Vue project Error in JsMediaSDK\_Instance is not defined

**URL:** <https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550>\
**Category:** Web\
**Created:** [November 10, 2020, 5:42am UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550 "2020-11-10T05:42:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsuCheng](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hsucheng/32/19806_2.png) [@hsuCheng](https://devforum.zoom.us/u/hsuCheng)\
**Post date:** [November 10, 2020, 5:42am UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550/1 "2020-11-10T05:42:10Z")

</div>

**Description**  
A clear and concise description of what the question is.

**Error**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/4/14ae4abddbf0e7950b4dddeebf31aa5bc55bd9f8.png)

**Which version?**  
1.8.1.

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Go to ‘…’
2. Click on ‘…’
3. Scroll down to ‘…’
4. See error

**Screenshots**  
If applicable, add screenshots to help explain your problem.

**Device (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Version: [e.g. 22]
- Browser:[e.g. Chrome]

**Additional context**  
Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 10, 2020, 9:01pm UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550/2 "2020-11-10T21:01:54Z")

</div>

Hey @hsuCheng,

Have you seen the other similar topics with solutions? If not, please check the threads here:

[https://devforum.zoom.us/search?q=Error%20in%20JsMediaSDK\_Instance%20is%20not%20defined](https://devforum.zoom.us/search?q=Error%20in%20JsMediaSDK_Instance%20is%20not%20defined)

If you don’t find the answer you are looking for, please let me know. 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![hsuCheng](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hsucheng/32/19806_2.png) [@hsuCheng](https://devforum.zoom.us/u/hsuCheng)\
**Post date:** [November 11, 2020, 1:00am UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550/3 "2020-11-11T01:00:41Z")

</div>

Yes, i have checked, but it didn’t work  
i used zoom with npm package in my vue project; but i have to use “ZoomMtg.setZoomJSLib(‘[https://jssdk.zoomus.cn/1.8.1/lib](https://jssdk.zoomus.cn/1.8.1/lib)’, ‘/av’)”, otherwise it did’t work. In the zoom api documents it recommend "  
ZoomMtg.setZoomJSLib(‘node\_modules/@zoomus/websdk/dist/lib’, ‘/av’)", so i am very confused.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 11, 2020, 7:07pm UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550/4 "2020-11-11T19:07:47Z")

</div>

Hey @hsuCheng,

Happy to clear up the confusion.

> [@hsuCheng](#):
>
> ZoomMtg.setZoomJSLib(‘[https://jssdk.zoomus.cn/1.8.1/lib’](https://jssdk.zoomus.cn/1.8.1/lib%E2%80%99), ‘/av’)”

This is using the [CDN version](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build#option-2-import-through-cdn) of the Web SDK.

> [@hsuCheng](#):
>
> ZoomMtg.setZoomJSLib(‘node\_modules/@zoomus/websdk/dist/lib’, ‘/av’)"

This is using the [local install](https://marketplace.zoom.us/docs/sdk/native-sdks/web/build#option-1-import-module-locally) (NPM) version of the Web SDK. For Vue apps, I suggest to use this method. Just make sure the files listed here are accessible and bundled with your project:

> **[@zoomus/websdk](https://www.npmjs.com/package/@zoomus/websdk#usage)**
>
> Zoom Web SDK. Latest version: 2.18.2, last published: 8 days ago. Start using @zoomus/websdk in your project by running \`npm i @zoomus/websdk\`. There are 4 other projects in the npm registry using @zoomus/websdk.

Does that help? 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![hsuCheng](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hsucheng/32/19806_2.png) [@hsuCheng](https://devforum.zoom.us/u/hsuCheng)\
**Post date:** [December 2, 2020, 3:06am UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550/5 "2020-12-02T03:06:37Z")

</div>

As ur suggest; I copied the whole lib directory to the directory that was listened by the vue-cli devServe and it worked；  
hey tommy can i advise that the av lib can be imported by developer like “import ‘XXXXX’” or require(‘XXXX’), otherwise developer have to copy the av lib to somewhere that listened by the devServe.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [December 2, 2020, 8:20pm UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550/6 "2020-12-02T20:20:05Z")

</div>

Hey @hsuCheng,

Happy to hear you got it sorted out! 🙂

Yes, we will work on making the [import statement](https://www.npmjs.com/package/@zoomus/websdk#usage) include all the necessary files by default.

In the meantime, you can see the Angular Sample App for an example of how to bundle the files automatically:

> <https://github.com/zoom/websdk-sample-angular/blob/master/angular.json#L27>

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [January 2, 2021, 6:20am UTC](https://devforum.zoom.us/t/vue-project-error-in-jsmediasdk-instance-is-not-defined/35550/7 "2021-01-02T06:20:15Z")

</div>

Closed on January 2, 2021, 6:20am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
