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

React server side rendering self is not defined error #381

Closed
ubershmekel opened this issue May 12, 2017 · 2 comments
Closed

React server side rendering self is not defined error #381

ubershmekel opened this issue May 12, 2017 · 2 comments

Comments

@ubershmekel
Copy link

When I npm install @shopify/buy-button-js and import it in a https://github.com/zeit/next.js app I get this error during the react server side rendering:

ReferenceError: self is not defined

I'm not sure of a way to conditionally include the shopify button code. This is not an issue with shopify-buy though I'm not sure how to get ShopifyBuy.UI working with that (UI seems to be undefined).

@ubershmekel
Copy link
Author

Here's a working example with the problem. Just run yarn then yarn run dev

https://github.com/ubershmekel/shopifybuybuttonissue

@melissaluu
Copy link
Contributor

We've updated all our packages recently. Reopen if this issue still occurs.

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