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

Cannot require the library being an ES Module #154

Open
jp06 opened this issue Sep 8, 2024 · 0 comments
Open

Cannot require the library being an ES Module #154

jp06 opened this issue Sep 8, 2024 · 0 comments

Comments

@jp06
Copy link

jp06 commented Sep 8, 2024

I think it would be nice to have it work for both CommonJS require and ES Modules import. At least, the current readme implies you can do a require but you'll actually get a ERR_REQUIRE_ESM error when you follow the example code. As a workaround, one can do a dynamic import or change the package.json's type to module when using this library (what I did for my script).

I already generated my EPUBs and have imported them on my Kobo, thank you for your work on this fork!

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

1 participant