zloirock / core-js

Standard Library
MIT License
24.46k stars 1.65k forks source link

core js throws undefined error when loading with Salesforce LWC Component #1145

Closed ajmujaa closed 1 year ago

ajmujaa commented 1 year ago

I am using an api called DAWA for Danish Addresses and it uses the Core JS (https://dawadocs.dataforsyningen.dk/dok/guide/autocomplete). When the files are loading in Salesforce Lightning Web Component Framework, it throws an error Undefined for Core JS. doesn't give me any more information than that. I am using core js version 2.4.1 which is the version that DAWA is using in it's example. I tried to change to different versions of Core JS and still getting the same error

Any suggestions how can I fix it. When I tried it with a local project, it just works fine

I have posted this question with the code here https://salesforce.stackexchange.com/questions/389824/adding-third-party-library-to-salesforce-lwc

zloirock commented 1 year ago

core-js@2.4.1 was published 6.5 years ago, is obsolete, and is no longer maintained. In the code, I don't see anything bound to this version - it seems, it's only an example. Use the actual core-js version.

In your error stack, I don't see anything related to core-js, so I don't think that this issue is something related to core-js.

If you think this is somehow related, please add a reproducible example.

ajmujaa commented 1 year ago

I updated to lates version and now I don't get that error, but a different one which I thin more related to dawa library. I'll close this one, thank you