question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Interactive Book type: Javascript error - only one instance of babel-polyfill is allowed

See original GitHub issue

Hi,

I’ve been using h5p-standalone to run H5P’s offline and it’s really great for that! Unfortunately a small minority of files, in particular interactive book, seem to have a javascript conflict. If you try the interactive book example from the h5p.org website, you will get the following Javascript error on both Chrome and Firefox:

Uncaught Error: only one instance of babel-polyfill is allowed
    at Object.<anonymous> (h5p-interactive-book.js:1)
    at Object.<anonymous> (h5p-interactive-book.js:1)
    at n (h5p-interactive-book.js:1)
    at Module.<anonymous> (h5p-interactive-book.js:10)
    at n (h5p-interactive-book.js:1)
    at h5p-interactive-book.js:1
    at h5p-interactive-book.js:1
h5p-interactive-book.js:10 Uncaught TypeError: Cannot read property 'title' of undefined
    at new e (h5p-interactive-book.js:10)
    at Object.i.newRunnable (frame.bundle.js:3)
    at HTMLDivElement.<anonymous> (frame.bundle.js:3)
    at Function.each (frame.bundle.js:3)
    at init.each (frame.bundle.js:3)
    at Object.i.init (frame.bundle.js:3)
    at HTMLDocument.<anonymous> (frame.bundle.js:3)
    at u (frame.bundle.js:3)
    at Object.fireWith [as resolveWith] (frame.bundle.js:3)
    at Function.ready (frame.bundle.js:3)

I’m not a Javascript expert, but it seems like babel-polyfill has been used in both h5p-standalone and in the above h5p content type. Babel-polyfill states that it should not be used in libraries for this reason.

Does anyone have any idea where babel-polyfill is being used in h5p-standalone? I am willing to prepare a pull request to deal with this. I think babel-polyfill should either be removed as a dependency (as it is already being used by H5P where needed) or there should be some kind of option for it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
murageyuncommented, Sep 28, 2021

Any news for this?

@busgurlu is already doing some great work that will fix the issue here #94

1reaction
elmitxelcommented, May 18, 2021

this problem is not solved yet, right? Thanks for your comments

Read more comments on GitHub >

github_iconTop Results From Across the Web

error Error: only one instance of babel-polyfill is allowed #401
I try to use babel-polyfill for ie11 with webpack ... Interactive Book type: Javascript error - only one instance of babel-polyfill is ......
Read more >
"Only one instance of babel-polyfill is allowed" error
Only one instance of babel-polyfill is allowed usually appears if the order of files being wrapped isn't correct when making use of ...
Read more >
Uncaught Error: only one instance of babel-polyfill is allowed
We get this error in the Browser Console: custombox.legacy.min.js?ver=1.1:15 Uncaught Error: only one instance of babel-polyfill is allowed at Object.
Read more >
Only one instance of babel-polyfill is allowed" error-Reactjs
Only one instance of babel-polyfill is allowed usually appears if the order of files being wrapped isn't correct when making use of CommonsChunkPlugin...
Read more >
Popup Anything on Click - Documentation - Essential Plugin
If you are facing any error related Polyfill JS eg : Uncaught Error: only one instance of babel-polyfill is allowed, than select above...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found