clappr-level-selector-plugin
clappr-level-selector-plugin copied to clipboard
Import in react causes error: "ReferenceError: installedModules is not defined"
I'm using Clappr in React 16.13.1. The player renders fine without plugins and renders as expected when I'm using other plugins including clappr-playback-rate-plugin, clappr-chromecast-plugin, and clappr-audio-selector-plugin. But for some reason when I import like this I get the error:
import LevelSelector from 'clappr-level-selector-plugin';
From package.json:
"clappr": "^0.3.13",
"clappr-audio-selector-plugin": "^0.1.37",
"clappr-chromecast-plugin": "^0.1.1",
"clappr-level-selector-plugin": "^0.2.1",
"clappr-playback-rate-plugin": "^0.6.0",
Error:
ReferenceError: installedModules is not defined
(anonymous function)
node_modules/clappr-level-selector-plugin/dist/level-selector.js:44
41 | /******/ __webpack_require__.m = modules;
42 | /******/
43 | /******/ // expose the module cache
> 44 | /******/ __webpack_require__.c = installedModules;
45 | /******/
46 | /******/ // define getter function for harmony exports
47 | /******/ __webpack_require__.d = function(exports, name, getter) {
Hello adam, Have you solved this issue? it seems like the plugin is not compatible with the current clappr version.
the built code that is published to npm seem to contain an error in dist/levels-selector.js
/******/ // The module cache
/******/ var installedModuleds = {};
instead of
/******/ // The module cache
/******/ var installedModules = {};