Interactive Book type: Javascript error - only one instance of babel-polyfill is allowed
See original GitHub issueHi,
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:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
@busgurlu is already doing some great work that will fix the issue here #94
this problem is not solved yet, right? Thanks for your comments