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

EventEmitter2 is not a constructor #23

Open
eyesmarty opened this issue Mar 27, 2021 · 1 comment
Open

EventEmitter2 is not a constructor #23

eyesmarty opened this issue Mar 27, 2021 · 1 comment

Comments

@eyesmarty
Copy link

eyesmarty commented Mar 27, 2021

Framework: electron
OS: MAC catalina 10.15.6
Package.json
"eventemitter2": "^6.4.4",
"gkm": "^0.2.0",
Error
TypeError: EventEmitter2 is not a constructor
at eval (webpack:///./node_modules/gkm/gkm.js?:9:14)
at Object../node_modules/gkm/gkm.js (/Users////dist_electron/index.js:1622:1)
at webpack_require (/Users/
//team-viewer/dist_electron/index.js:20:30)
at eval (webpack:///./src/background.js?:15:13)
at Module../src/background.js (/Users/
///dist_electron/index.js:3802:1)
at webpack_require (/Users/
///dist_electron/index.js:20:30)
at eval (webpack:///multi_./src/background.js?:1:18)
at Object.0 (/Users/
///dist_electron/index.js:3813:1)
at webpack_require (/Users/
///dist_electron/index.js:20:30)
at /Users/
//*/dist_electron/index.js:84:18

@tomzx
Copy link
Owner

tomzx commented Mar 27, 2021

gkm 0.2.0 is based on an old version of eventEmitter2 (~0.4.13). I believe that starting with version 1.0.0, instead of exporting EventEmitter2 in the exports, they turned it into the exports (e.g., exports.EventEmitter2 = EventEmitter vs exports = EventEmitter).

My guess is that using the latest version of eventemitter2 (or ^6.4.4 in this case) is creating this conflict. If you don't need the latest eventemitter2, I'd suggest removing that dependency.

As I don't maintain this package anymore, I do not plan on fixing this issue or making further releases.

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

2 participants