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

Uncaught TypeError when using package with Vite #358

Closed
Doreen-Schwartz opened this issue Nov 7, 2023 · 2 comments
Closed

Uncaught TypeError when using package with Vite #358

Doreen-Schwartz opened this issue Nov 7, 2023 · 2 comments

Comments

@Doreen-Schwartz
Copy link

Hello, I've been using your package for a React project that was based on the Create React App framework and have had no issue utilizing it. Since the framework is deprecated and has security issues, I need to migrate our project to Vite.

Unfortunately, I encountered the following error when attempting to run it:
image

Following the link mentioned in the warning above, I see that the issue is caused by a Node module, events, being used. Since Vite does not automatically apply polyfills, this error appears.

Though I could install the polyfill to fix this issue, I noticed that the Readme mentions this package is meant to be compatible with browsers, so I wanted to open this issue.

@mjradwin
Copy link
Member

Thanks for writing. Please migrate your application to use @hebcal/core which is actively maintained. The API in @hebcal/core is very similar, but not identical, to the no-longer-maintained hebcal package.

Based on the error message you posted above, it appears that you are still using the deprecated hebcal API, which hasn't been updated in 4+ years.

@Doreen-Schwartz
Copy link
Author

I see what you mean. You are correct, the API was indeed the old one. I've switched it and the problem was resolved, thank you.

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