• Resolved andy835

    (@andy835)


    I’m using the Monaco editor by Microsoft to create an online code editor and it uses this script called loader.js. Which is conflicting with timeme.min.js. Is there a workaround for this?

    Uncaught Error: Can only have one anonymous define call per script file
    at s.enqueueDefineAnonymousModule (loader.js:1406:23)
    at g (loader.js:1896:27)
    at timeme.min.js?ver=1.3.4:1:6348
    at timeme.min.js?ver=1.3.4:1:6393

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @andy835,

    I need to relay this to our developers, I will get back to you on this as soon as possible. Thank you for your patience!

    Kind regards, Kim van Dijk

    Plugin Author Hessel de Jong

    (@hesseldejong)

    Hi @andy835,

    TimeMe.js uses a ‘factory’ to define all TimeMe functions. One possible cause of the error could be that there are multiple factories defined in the codebase, and they are conflicting with each other. This could happen if two or more modules are trying to define themselves as global variables or using the same module name. So you could check if there are conflicts between Monaco and TimeMe.

    We really want to help with all kinds of issues, but I am afraid you are on your own to debug this issue for such a niche library. I hope I have helped you in the right direction to solving this issue.

    Kind regards,
    Hessel

    Thread Starter andy835

    (@andy835)

    Is there a way I can get the plugin working without Timeme.js? I’m looking for a Workaround not necessarily a fix.

    Can you provide me with the unminified JavaScript files because it’s kind of hard to debug this with minified js?

    Plugin Author Hessel de Jong

    (@hesseldejong)

    Hi @andy835,

    TimeMe is used to track the time on page, so it is possible, but time per session and time per page will not be tracked properly. Also, bounces will not be properly tracked. So you could make it so that TimeMe is not needed, but many things will not be properly tracked. You could modify the function burst_get_time_on_page and set the time_on_page to 1.

    The plugin should come with all unminified scripts. You can find the time script over here: https://github.com/Really-Simple-Plugins/burst/tree/main/helpers/timeme

    And the burst tracking script over here: https://github.com/Really-Simple-Plugins/burst/tree/main/assets/js/src

    I hope this helps.

    Kind regards,
    Hessel

    Thread Starter andy835

    (@andy835)

    Thanks for your help. I was able to fix the issue by modifying the timeme.js file so that it uses a global variables instead of module.exports or the define loader.

    Plugin Author Hessel de Jong

    (@hesseldejong)

    Great to hear @andy835! Happy you have resolved the issue!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin Conflict with loader script’ is closed to new replies.