Skip to content

Commit 26020e1

Browse files
authored
Fix issue 2546 - TypeError: Super expression must either be null or a function (#2578)
### Changes This moves the `events` package from a devDependency to a dependency. This ensures that when a consumer is installing the package that the `events` package will be installed. The `events` package makes available the `EventsEmitter` class which is typically available in node environments (not browser). It's used here in this [repo](https://github.com/auth0/lock/blob/645947cf0a4a2f12006042c585f4bdd6c2de73ec/src/core.js#L1). This is the cause of the issue referenced here #2546 Below is an image of the vite warning output explaining the same and below is the identical error referenced in the issue. ![image](https://github.com/user-attachments/assets/df3452ae-9a8e-4b74-aa43-b366ebe4c4ad) ### References Aims to fix this #2546. By stepping through the debugger you can see that the referenced symbol is the missing EventsEmitter class. ### Testing * [ ] This change adds unit test coverage * [ ] This change adds integration test coverage * [x] This change has been tested on the latest version of the platform/language ### Checklist * [x] I have read the [Auth0 general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) * [x] I have read the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) * [x] All code quality tools/guidelines have been run/followed * [x] All relevant assets have been compiled
1 parent 6d12374 commit 26020e1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package-lock.json

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"eslint-config-prettier": "^8.8.0",
8282
"eslint-plugin-react": "^7.32.2",
8383
"esm": "^3.2.25",
84-
"events": "^3.3.0",
8584
"expect.js": "^0.3.1",
8685
"flat": "^5.0.2",
8786
"glob": "^7.1.7",
@@ -125,6 +124,7 @@
125124
"blueimp-md5": "^2.19.0",
126125
"classnames": "^2.3.2",
127126
"dompurify": "^3.2.5",
127+
"events": "^3.3.0",
128128
"immutable": "^3.7.6",
129129
"jsonp": "^0.2.1",
130130
"password-sheriff": "^1.1.1",
@@ -188,4 +188,4 @@
188188
"prettier --write"
189189
]
190190
}
191-
}
191+
}

0 commit comments

Comments
 (0)