# Error using Web SDK CDN in nuxt

**URL:** <https://devforum.zoom.us/t/error-using-web-sdk-cdn-in-nuxt/48930>\
**Category:** Web\
**Created:** [April 26, 2021, 11:27pm UTC](https://devforum.zoom.us/t/error-using-web-sdk-cdn-in-nuxt/48930 "2021-04-26T23:27:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhernandez](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dhernandez/32/17339_2.png) [@dhernandez](https://devforum.zoom.us/u/dhernandez)\
**Post date:** [April 26, 2021, 11:27pm UTC](https://devforum.zoom.us/t/error-using-web-sdk-cdn-in-nuxt/48930/1 "2021-04-26T23:27:15Z")

</div>

**Description**  
Hi, I have implemented the Web SDK CDN as indicated in a previous section:

> [@Black screen and no responsive in nuxtjs](https://devforum.zoom.us/t/black-screen-and-no-responsive-in-nuxtjs/48556/11):
>
> Hi @MaxM sorry for the delay in answering you, I was trying to implement all the changes you sent me but at the time of doing it I get the following error and I cannot identify why that happens, I have updated the github repository for you to help me review it, thank you very much

but I am getting a new error

**Error**  
The error occurs as soon as I enter the part where the sdk is implemented

 ![issue5](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/6/f60a5ff67cc71737e42c4e6290549d63d4f70af7.png)

**Which Web Client SDK version?**  
1.9.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):**  
All

**Additional context**  
It is worth mentioning that I want to use the sdk only in one page and I should not use it inside nuxt.config since it affects everything else, I attach the repository where I have the sdk section, thank you very much

> **[GitHub - Dennis-96/testZoom](https://github.com/Dennis-96/testZoom)**
>
> Contribute to Dennis-96/testZoom development by creating an account on GitHub.

---

<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:** [April 27, 2021, 6:13pm UTC](https://devforum.zoom.us/t/error-using-web-sdk-cdn-in-nuxt/48930/2 "2021-04-27T18:13:33Z")

</div>

Hey @dhernandez ,

I believe the issue is how you are defining “ZoomMtg”.

> <https://github.com/Cuervo20/testZoom/blob/main/components/ZoomWindow.vue#L27>

Checkout how we are defining “ZoomMtg” to the `window` in our Vue sample app:

> <https://github.com/zoom/websdk-sample-vuejs/blob/master/src/main.js#L6>

CC @MaxM

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![dhernandez](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dhernandez/32/17339_2.png) [@dhernandez](https://devforum.zoom.us/u/dhernandez)\
**Post date:** [April 27, 2021, 6:45pm UTC](https://devforum.zoom.us/t/error-using-web-sdk-cdn-in-nuxt/48930/3 "2021-04-27T18:45:01Z")

</div>

Hi @tommy thank you very much for answering I have to solve this problem urgently, as you tell me I am doing it, within the github repository I mention what you indicate but it still does not work, please what can I do since I have tried everything they indicated but it does not work.

> <https://github.com/Cuervo20/testZoom/blob/main/pages/main.js>

> <https://github.com/Cuervo20/testZoom/blob/main/pages/transmision.vue>

> <https://github.com/Cuervo20/testZoom/blob/main/components/ZoomWindow.vue>

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [April 28, 2021, 10:15pm UTC](https://devforum.zoom.us/t/error-using-web-sdk-cdn-in-nuxt/48930/4 "2021-04-28T22:15:39Z")

</div>

Hey @dhernandez,

Thank you for providing more detail. First, I noticed that package.json still references the Web SDK package. This likely isn’t the issue but it can be removed:

> <https://github.com/Cuervo20/testZoom/blob/73b46062271b9e87bc04a5ed3ace817084f50268/package.json#L12>

Further, I noticed that the main.js file is placed in the pages directory. With Vue.js, this won’t allow main.js to have the effect we want. Further, with Nuxt.js, the main.js file isn’t used.

It looks like the pattern for setting an object on the Vue Instance with Nuxt.js is to use a plugin. I found some documentation that might help below:

> <https://github.com/nuxt/nuxt.js/issues/837>
>
> In non nuxjs apps you put code that has run once on app startup in main.js or ap…p.vue. Both are not available in nuxtjs. Where do I put this code?
> 
> \<!--cmty--\>\<!--cmty\_prevent\_hook--\>
> \<div align="right"\>\<sub\>\<em\>This question is available on \<a href="https://nuxtjs.cmty.io"\>Nuxt.js\</a\> community (\<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c718"\>#c718\</a\>)\</em\>\</sub\>\</div\>

> <https://stackoverflow.com/questions/58038232/how-main-js-file-can-be-edited-in-nuxt-js/62690810#62690810>

> **[{{metadataController.pageTitle}}](https://subscription.packtpub.com/book/web_development/9781789952698/8/ch08lvl1sec53/injecting-functions-into-the-vue-instance)**
>
> {{metadataController.description}}

I hope that helps!

Thanks,  
Max

---

<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:** [May 29, 2021, 8:15am UTC](https://devforum.zoom.us/t/error-using-web-sdk-cdn-in-nuxt/48930/5 "2021-05-29T08:15:41Z")

</div>

Closed on May 29, 2021, 8:15am UTC

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