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

regeneratorRuntime Error #7

Open
trst opened this issue Sep 11, 2020 · 8 comments
Open

regeneratorRuntime Error #7

trst opened this issue Sep 11, 2020 · 8 comments

Comments

@trst
Copy link

trst commented Sep 11, 2020

Hello,

I've added the bold-subscriptions-js to a Shopify site via the CDN method. When ever I access the BoldSubscriptions.cart.standard.addToCart() method, I see an error log like this one:

Uncaught ReferenceError: regeneratorRuntime is not defined

I suspect this is a babel issue based on a cursory search but I'd be happy for it to be user error and something that could be corrected pretty quickly 😉 I can provide more details if needed.

@trst
Copy link
Author

trst commented Sep 11, 2020

For what it's worth, I solved by building from source and modifying the package.json Browserlists property to:

"browserslist": [
  "since 2017-06"
]

Certainly not as backwards compatible, but for my use case (i.e., assuming async capable browsers) it seems to work 🤷‍♀️

Is it worth submitting a pull request?

@morgan-wowk
Copy link
Collaborator

Hi all,

So sorry for the delay in replies here. Since the inception of this library Bold has introduced and now matured the version 2 of our Subscriptions application. I myself have been working on that v2 for a while and am just seeing some of these comments.

I really appreciate that you took the time to build from source and shared your solution.

I did receive feedback internally about a related issue and may have solved this when adding @babel/core to have better IE11 support. I tested and was unable to reproduce this issue today using the CDN version.

Closing this issue for the time being and looking forward to being more reactive on any BS2 library I may contribute to or publish in the future.

@Kyon147
Copy link

Kyon147 commented Jun 15, 2021

I'm also getting this same error on a client website.

@morgan-wowk
Copy link
Collaborator

@Kyon147 Would you be able to let me know the browser, browser version and if you are also using the BoldSubscriptions.cart.standard.addToCart() function?

@morgan-wowk morgan-wowk reopened this Jun 15, 2021
@Kyon147
Copy link

Kyon147 commented Jun 15, 2021

@Kyon147 Would you be able to let me know the browser, browser version and if you are also using the BoldSubscriptions.cart.standard.addToCart() function?

Sure thing, Chrome, Version 91.0.4472.77 (Official Build) (x86_64)

@morgan-wowk
Copy link
Collaborator

As a temporary solution, please consider trying the suggested fix above, locally, and compiling from source using yarn build-cdn. Actively looking at this though. Thanks for your patience

@morgan-wowk
Copy link
Collaborator

Can you let me know if there's any differences in what I am doing here compared to your implementation? Seems to be working okay on chrome version 91.

Screen Shot 2021-06-22 at 3 49 25 PM

Screen Shot 2021-06-22 at 3 50 14 PM

@morgan-wowk
Copy link
Collaborator

morgan-wowk commented Jun 22, 2021

I have added the beta version 1.2.8-beta that you can try out.

For CDN, the URL is:

https://unpkg.com/@boldcommerce/[email protected]/dist/bold-subscriptions-js.min.js

Please let me know how this works out for 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

3 participants