lock
lock copied to clipboard
Fix issue 2546 - TypeError: Super expression must either be null or a function
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.
This is the cause of the issue referenced here https://github.com/auth0/lock/issues/2546
Below is an image of the vite warning output explaining the same and below is the identical error referenced in the issue.
References
Aims to fix this https://github.com/auth0/lock/issues/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
- [x] I have read the Auth0 Code of Conduct
- [x] All code quality tools/guidelines have been run/followed
- [x] All relevant assets have been compiled