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

Error: "Cannot redefine property: Shopify" when run Hydrogen on local #2549

Open
danhloc112 opened this issue Sep 19, 2024 · 4 comments
Open

Comments

@danhloc112
Copy link

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2024.7.7

What version of Remix are you using?

No response

Steps to Reproduce

I added the PUBLIC_CHECKOUT_DOMAIN equal to STORE_NAME.myshopify.com (by following this post from Shopify Community: https://community.shopify.com/c/hydrogen-headless-and-storefront/issues-setting-up-hydrogen-locally/m-p/2615078)
and run the command npm run dev. The site localhost:3000 reloaded continuously and I saw an error on console log:
Image

Expected Behavior

n/a

Actual Behavior

n/a

@danhloc112
Copy link
Author

Updated: It does not happen on version 2024.7.3 of Hydrogen

@wizardlyhel
Copy link
Contributor

wizardlyhel commented Sep 19, 2024

In your code, do you have windows.Shopify defined anywhere?

I am unable to reproduce this error from a fresh install of 2024.7.7. Are you upgrading from an older project? Was it from 2024.7.3?

Also, it should not reload continuously. The error you see might be the side effect of reloading continuously.

@danhloc112
Copy link
Author

No, I do not.
I just create a Hydrogen project and add environment variables

@wizardlyhel
Copy link
Contributor

I can't reproduce this at all. Please provide detail instruction to reproduce this error, including your npm version, nodejs version, operating system you are using

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