Support » Plugin: WP Popups - WordPress Popup builder » Conflict importing double “babel-polyfill” library

  • Resolved arnedb

    (@arnedb)


    Hello there,

    On my website I am running your plugin, together with the Amalia Appointment plugin.
    Both plugins seem to be loading the “babel-polyfill” library which is resulting in the following error:
    Uncaught Error: only one instance of babel-polyfill is allowed
    https://i.gyazo.com/9dacebe860f488e3f086dfc01ae2052e.png

    I was wondering if it’s maybe possible to coditionally add babel-polyfill:

    if (!global._babelPolyfill) {
       require('babel-polyfill');
    }

    I will also notify the developers of Amalia plugin

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Damian

    (@timersys)

    Are you sure it’s from us? Where do you get that error? I don’t think we use that on the plugin live scripts.

    Hello there,

    What I think is happening is that your plugin load the babel-polyfill library. And then a bit later the Amalia plugin also tries to load the same library which results in this error.

    Is that a possiblity, or am I completely wrong?

    Plugin Author Damian

    (@timersys)

    Try deactivate our plugin and check if the error persists.

    Yes, that’s the problem, I already tried that.

    When I disable your plugin the error goes away.

    Plugin Author Damian

    (@timersys)

    Could you show me the url where you having the issue?

    Hello there,

    Thanks for you quick replies.

    Here is a staging site where I simulated the issue:
    https://beelkevan-kavsit.savviihq.com/afspraak-maken/

    Both amalia plugin & popup plugin are active here.

    If I disable popup plugin, the javascript console error goes away.

    Plugin Author Damian

    (@timersys)

    What do you have inside the popup?

    I am using the default “elegant” one you can choose when you start making a popup.

    Plugin Author Damian

    (@timersys)

    We don’t uset polyfill but it’s possible one of the libraries we use does. All the libraries we use are wordpress files
    If you checks the sources /wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.4.4
    but not sure which script it’s requiring that. I’m afraid the fix will need to go on the other plugin. They need to check if wordpress polyfill it’s already loaded

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.