Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

TypeError: eventemitter3_1.EventEmitter is not a constructor #267

Closed
mjasnikovs opened this issue Sep 6, 2017 · 6 comments
Closed

TypeError: eventemitter3_1.EventEmitter is not a constructor #267

mjasnikovs opened this issue Sep 6, 2017 · 6 comments

Comments

@mjasnikovs
Copy link

mjasnikovs commented Sep 6, 2017

image

client.js:47 Uncaught TypeError: eventemitter3_1.EventEmitter is not a constructor
    at new SubscriptionClient (client.js:47)
    at Object../src/index.js (index.js:33)
    at __webpack_require__ (bootstrap b03e71f0b0db94868ce6:669)
    at fn (bootstrap b03e71f0b0db94868ce6:87)
    at Object.0 (splashscreen.js:10)
    at __webpack_require__ (bootstrap b03e71f0b0db94868ce6:669)
    at bootstrap b03e71f0b0db94868ce6:715
    at bundle.js:719

To fix, had to manually install

npm install --save eventemitter3@2.0.3
@mistic
Copy link
Contributor

mistic commented Sep 22, 2017

@mjasnikovs what's the version where this thing happened to you? Is it still happening now? Have u tried a clean npm install ?

@tujoworker
Copy link

Yes, this happens still on the latest version 0.9.1. Clean install did not help by the way.

@mjasnikovs
Copy link
Author

@mistic Just created a new project, same issue in 2018.
I googled error, and find my own answer :/

@wizbooth
Copy link

I have the same problem.

@miguelcaravantes
Copy link

miguelcaravantes commented Mar 24, 2018

#99

npm i eventemitter3@2.0.3 --save
it works for me

@rozsikristof
Copy link

Probably not relevant anymore 2 years later, but if anyone has the same problem I have an answer which worked for me. When you import the eventemitter3 you should do it like this:

import { EventEmitter } from 'eventemitter3';

not like this:

import EventEmitter from 'eventemitter3';

@glasser glasser closed this as completed Mar 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants