You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PopupStore class extends EventEmitter class from events package. There is a standard NodeJS library with such a name and a kind of polyfil as events package on NPM. Usually it might be already installed as a dependency in your project by other tools (in my cause it's webpack and its plugins) But if not, the react-popup package might brake an app.
Once I replaced Webpack with Vite the app broke with the following error:
Uncaught TypeError: Super expression must either be null or a function
at _inherits (react-popup.js?v=5c9bd9e2:367:15)
at react-popup.js?v=5c9bd9e2:430:7
at node_modules/react-popup/dist/Store.js (react-popup.js?v=5c9bd9e2:506:6)
So, I would recommend to either add the events library as a dependency, or find another way to implement event emitting using browser's native APIs (e.g. EventTarget).
The text was updated successfully, but these errors were encountered:
berdyshev
changed the title
events dependency is not specified
Missed events package causes crash
Apr 26, 2024
The PopupStore class extends
EventEmitter
class fromevents
package. There is a standard NodeJS library with such a name and a kind of polyfil asevents
package on NPM. Usually it might be already installed as a dependency in your project by other tools (in my cause it'swebpack
and its plugins) But if not, the react-popup package might brake an app.Once I replaced Webpack with Vite the app broke with the following error:
So, I would recommend to either add the
events
library as a dependency, or find another way to implement event emitting using browser's native APIs (e.g. EventTarget).The text was updated successfully, but these errors were encountered: