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

Using convert with vanilla JS doesn't work #560

Closed
nikushx opened this issue Nov 14, 2022 · 5 comments
Closed

Using convert with vanilla JS doesn't work #560

nikushx opened this issue Nov 14, 2022 · 5 comments
Assignees
Labels
bug Something isn't working released

Comments

@nikushx
Copy link

nikushx commented Nov 14, 2022

I tried the unpkg link for this repo and it did not work. I hacked the script to extract the convert, convertMany, and ms functions out (if you're looking to do this just set e to an external variable where e.convert is being set.)

Maybe I did something wrong but I had to hack it to extract the convert function at all. It doesn't set on the window.

@jonahsnider jonahsnider added the bug Something isn't working label Nov 20, 2022
@jonahsnider jonahsnider self-assigned this Nov 20, 2022
@jonahsnider
Copy link
Owner

Thanks for reporting this, the issue was a misconfiguration of Babel during the build process, which was causing the global variable used to be unknown instead of convert.

@jonahsnider
Copy link
Owner

🎉 This issue has been resolved in version 4.7.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mahony0
Copy link

mahony0 commented Sep 28, 2023

This issue still persists as of v4.13.2. It shows "Uncaught TypeError: convert is not a function" error

@jonahsnider jonahsnider reopened this Sep 28, 2023
@mahony0
Copy link

mahony0 commented Sep 28, 2023

Here are further details,

convert looks like an object, not a method
1

I can use like this
2

@jonahsnider
Copy link
Owner

Please see #612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

3 participants