# Error ‘$jscomp is not defined’ When Publishing Plugin

**URL:** <https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461>\
**Category:** Plugins\
**Created:** [February 13, 2019, 11:11pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461 "2019-02-13T23:11:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [February 13, 2019, 11:11pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/1 "2019-02-13T23:11:01Z")

</div>

Now you can build your own Rich Text Editor using native Bubble Actions - [https://xl-rich-text-editor.bubbleapps.io/](https://xl-rich-text-editor.bubbleapps.io/)

Plugin is here - [https://bubble.io/plugin/rich-text-editor-xl-1549672193452x248975639913693200](https://bubble.io/plugin/rich-text-editor-xl-1549672193452x248975639913693200)

Please let me know your thoughts.

---

<div class="post-metadata">

**Author:** ![JohnMark](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnmark/32/42431_2.png) [@JohnMark](https://forum.bubble.io/u/JohnMark)\
**Post date:** [February 13, 2019, 11:21pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/2 "2019-02-13T23:21:25Z")

</div>

It work fine. Great.

---

<div class="post-metadata">

**Author:** ![Kfawcett](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kfawcett/32/38097_2.png) [@Kfawcett](https://forum.bubble.io/u/Kfawcett)\
**Post date:** [February 13, 2019, 11:53pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/3 "2019-02-13T23:53:26Z")

</div>

Hmm, at first review this seems pretty genius.

---

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [February 14, 2019, 8:35pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/4 "2019-02-14T20:35:51Z")

</div>

**Part 1**  
 ![com-video-to-gif-2](https://us1.discourse-cdn.com/bubble/original/3X/e/8/e81e26a717d9c79b34ecb85819e5a66a834237b7.gif)

**Par 2**  
 ![com-video-to-gif-3](https://us1.discourse-cdn.com/bubble/original/3X/8/8/883b4d05c3057f82655a97bddd15a3a2d8fd9269.gif)

**Part 3**  
 ![com-video-to-gif-4](https://us1.discourse-cdn.com/bubble/original/3X/6/d/6d7726cdb2abd9380899d1de28561fe39345d85c.gif)

---

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [March 2, 2019, 2:35pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/5 "2019-03-02T14:35:34Z")

</div>

Dear Fellow Plugin Developers!

A lesson learn here:

When I originally published the plugin, I had a Demo page running plugin (like a test version) and the “live version” out there. Later a couple of subscribers contacted me saying that the plugin in did not work at all.

Basically, although the plugin in worked well in test mode it for some reason did not publish well.

The error was to do with ‘ **$jscomp is not defined** ’, which is to do with compiler…

The solution was a follows:

While in plugin editor:

1. Open browser Console;
2. In Console, type and run ‘ **window.do\_not\_minify\_plugin = true** ’;
3. Publish the plugin

This worked for me. Hope will help you too.

---

<div class="post-metadata">

**Author:** ![richardosborne14](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/richardosborne14/32/169365_2.png) [@richardosborne14](https://forum.bubble.io/u/richardosborne14)\
**Post date:** [March 2, 2019, 6:06pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/6 "2019-03-02T18:06:22Z")

</div>

I would like to buy you a beer Sir. This plugin might just change my life.

---

<div class="post-metadata">

**Author:** ![richardosborne14](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/richardosborne14/32/169365_2.png) [@richardosborne14](https://forum.bubble.io/u/richardosborne14)\
**Post date:** [March 2, 2019, 10:00pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/7 "2019-03-02T22:00:30Z")

</div>

If this plugin could expose an “Insert text” / “Insert HTML” action, it’d be gold. Is that on the cards?

---

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [March 2, 2019, 10:25pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/8 "2019-03-02T22:25:31Z")

</div>

Insert Delta and Plain Text should already be there as actions.

Insert HTML is added and is NOW added too.

Anything else on your wish list?

---

<div class="post-metadata">

**Author:** ![richardosborne14](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/richardosborne14/32/169365_2.png) [@richardosborne14](https://forum.bubble.io/u/richardosborne14)\
**Post date:** [March 3, 2019, 7:47am UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/9 "2019-03-03T07:47:07Z")

</div>

Jeepers, that was fast! Thanks so much. I’ve subscribed to the plugin now, I’ll let you know if anything else comes up. Thanks again!

---

<div class="post-metadata">

**Author:** ![richardosborne14](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/richardosborne14/32/169365_2.png) [@richardosborne14](https://forum.bubble.io/u/richardosborne14)\
**Post date:** [March 4, 2019, 10:15pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/10 "2019-03-04T22:15:50Z")

</div>

Is there a way to insert the HTML / plain text at the cursor?

Also, I use a lot of `<video>` and `<table>` tags in my app, but when I use the “Replace HTML” action with a video player or a table it doesn’t show the player or the table inside the text editor 😢. I’ve put a couple of examples of the code I’m trying to insert below (the table is just lifted from [w3schools.com](http://w3schools.com) it’s not real data of mine):

```
<video width="320" height="240" controls>
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

<table>
  <tr>
    <th>Company</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
  </tr>
  <tr>
    <td>Ernst Handel</td>
  </tr>
  <tr>
    <td>Island Trading</td>
  </tr>
  <tr>
    <td>Laughing Bacchus Winecellars</td>
  </tr>
  <tr>
    <td>Magazzini Alimentari Riuniti</td>
  </tr>
</table>
```

---

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [March 5, 2019, 12:39am UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/11 "2019-03-05T00:39:58Z")

</div>

The Insert at cursor action is ADDED.

Today I fixed Video for YouTube and Vimeo.

Your video would work too (please see below, you need to insert [//commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4](https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4) [no http])  
(I shall fix this to me automatic too…)

 ![10%20am](https://us1.discourse-cdn.com/bubble/original/3X/0/4/04096e1f8fb4ffdd39643fbdf6d2cef71ed3ee44.png)

In terms of tables, it is on the list but my current solution is not good for publishing…  
Tables are at priority as I need them myself.

---

<div class="post-metadata">

**Author:** ![richardosborne14](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/richardosborne14/32/169365_2.png) [@richardosborne14](https://forum.bubble.io/u/richardosborne14)\
**Post date:** [March 5, 2019, 6:02am UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/12 "2019-03-05T06:02:53Z")

</div>

That’s all great news, thanks so much!

---

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [March 6, 2019, 12:26am UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/13 "2019-03-06T00:26:46Z")

</div>

The Insert at cursor action is added.

You may insert Plain Text as well as HTML.

Example are at the bottom here - [https://xl-rich-text-editor.bubbleapps.io/](https://xl-rich-text-editor.bubbleapps.io/)

Could you please update your plugin and let me know if that is what you expected?

---

<div class="post-metadata">

**Author:** ![ikkyu1755](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ikkyu1755/32/96209_2.png) [@ikkyu1755](https://forum.bubble.io/u/ikkyu1755)\
**Post date:** [March 6, 2019, 1:35am UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/14 "2019-03-06T01:35:54Z")

</div>

Hey!  
Will you be pulling the price down anytime soon? I’m doing a school project and I’m considering it, but a $150 is probably a little too much for me. (I feel like a total CB)

---

<div class="post-metadata">

**Author:** ![richardosborne14](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/richardosborne14/32/169365_2.png) [@richardosborne14](https://forum.bubble.io/u/richardosborne14)\
**Post date:** [March 6, 2019, 8:22am UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/15 "2019-03-06T08:22:32Z")

</div>

It’s perfect, works exactly as I imagined, thanks so much!

Unfortunately the insert video action puts the mp4 url into an iframe, so I can’t switch off autoplay. I’m often displaying multiple videos on the screen at once so it won’t work without the `<video>` tag.

@ikkyu1755 this plugin is definitely worth the money, why don’t you try the monthly subscription first?

---

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [March 6, 2019, 12:02pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/16 "2019-03-06T12:02:12Z")

</div>

Could you DM me an example of what you are trying to achieve in terms of having multiple videos?

I will look into the video tags and see if these may be used instead of iframes 🙂

---

<div class="post-metadata">

**Author:** ![ikkyu1755](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ikkyu1755/32/96209_2.png) [@ikkyu1755](https://forum.bubble.io/u/ikkyu1755)\
**Post date:** [March 9, 2019, 1:17pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/17 "2019-03-09T13:17:19Z")

</div>

I’m going to do a monthly subscription, I’ve decided.  
Sorry for asking, I was thinking weirdly, lol.  
I’ll post a review of it later when I get the plugin. Thanks for making good stuff like this!

---

<div class="post-metadata">

**Author:** ![ikkyu1755](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/ikkyu1755/32/96209_2.png) [@ikkyu1755](https://forum.bubble.io/u/ikkyu1755)\
**Post date:** [March 9, 2019, 1:23pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/18 "2019-03-09T13:23:00Z")

</div>

@funwtp On the demo page, the subscript demo is written as “superscript”. Maybe edit that also!

---

<div class="post-metadata">

**Author:** ![funwtp](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/funwtp/32/27279_2.png) [@funwtp](https://forum.bubble.io/u/funwtp)\
**Post date:** [March 9, 2019, 1:33pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/19 "2019-03-09T13:33:59Z")

</div>

This helpful comment is the only reason why price has not gone up [yet].

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [March 18, 2019, 8:33pm UTC](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461/20 "2019-03-18T20:33:18Z")

</div>

> [@funwtp](#):
>
> When I originally published the plugin, I had a Demo page running plugin (like a test version) and the “live version” out there. Later a couple of subscribers contacted me saying that the plugin in did not work at all.
> 
> Basically, although the plugin in worked well in test mode it for some reason did not publish well.
> 
> The error was to do with ‘ **$jscomp is not defined** ’, which is to do with compiler…

Was this ever reported to Bubble as a bug (paging @neerja 🙂 )? I see a similar problem in a plugin that I am building.

I have a function defined as async (like "` node.onclick = async function datePick(){` ") which works fine in my testing app, but does not work in apps that I’ve given Private access to.

One key difference (as you note) between testing mode and published mode is minification / compilation. When run in published mode, my plugin throws:

```
Uncaught ReferenceError: $jscomp is not defined
    at HTMLDivElement.d.onclick (eval at b.create_code (x5:17), <anonymous>:19:179)

```

Of course, in production mode I _want_ my plugin to be minified, etc.

The problem area per the error message is:

`d.onclick=function(){var b=this,e,d,f,g,h,k,l,p,n;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(1==c.nextAddress){e=b.date;console.log("We are in datePick: clickDate is...",e,b.value,typeof b.value,e,typeof e);if(b.disabled||!a.data.moderange||a.data.picking)return c.jumpTo(2);console.log("WE ARE IN RANGEPICK START");` … etc.

So it looks like this compile/minify error (in my case) has something to do with the async nature of the function. (And this function _must_ be called as async as it does some Promise handling and awaits resolution of a Promise within it.)

(And, after testing your solution @funwtp, I find that the published plugin does work. I don’t like that it’s in non-minified mode, however!)

[Next page](https://forum.bubble.io/t/error-jscomp-is-not-defined-when-publishing-plugin/49461.md?page=2)
