Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adam-ducker opened this issue Mar 3, 2021 · 2 comments

Comments

@adam-ducker
Copy link

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 adam-ducker changed the title Import in react cases error: "ReferenceError: installedModules is not defined" Import in react causes error: "ReferenceError: installedModules is not defined" Mar 3, 2021
@mayur-keswani
Copy link

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

@mrbar42
Copy link

mrbar42 commented Apr 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants