clappr-level-selector-plugin icon indicating copy to clipboard operation
clappr-level-selector-plugin copied to clipboard

Import in react causes error: "ReferenceError: installedModules is not defined"

Open adam-ducker opened this issue 4 years ago • 2 comments

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) {

adam-ducker avatar Mar 03 '21 19:03 adam-ducker

Hello adam, Have you solved this issue? it seems like the plugin is not compatible with the current clappr version.

mayur-keswani avatar May 08 '22 10:05 mayur-keswani

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 = {};

mrbar42 avatar Apr 20 '23 11:04 mrbar42