-
Notifications
You must be signed in to change notification settings - Fork 21
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
buildConnectors
breaks hydrogen project
#212
Comments
Hey @justinhenricks 👋 Thanks for opening up this issue. Which versions of |
Thanks for the quick response! I did have to upgrade typescript from 4.something to 5.1.6. Also: Here is my full package:
Are you able to reproduce? |
@justinhenricks Yeah, I'm able to replicate this behavior. I do know that for the time being you can downgrade your I'm looking into this a bit more to see what changed, but my assumption is something related to cloudflare workers dropping support for something being used in the |
@QuintonC ok, cool, glad to hear it's reproducible. Yeah, was thinking the same thing. When I did get the app to start (by uncommenting out the
It seems like there is an open issue that may be related here: cloudflare/miniflare#34 I just tried downgrading my cli-hydrogen as you suggested but unfortunately, it seems to be totally breaking my bundle now, no CSS is loading. |
@justinhenricks Ah, that's probably because I gave you the wrong version number 😳. Sorry about that! Could you try The version I mentioned last time is not a valid version number, so it probably defaulted to utilizing If you have additional errors there, please let me know and if you can provide some additional steps to replicate let me know. Can you try with the correct version number and letting me know if that resolves the issue for you? Investigation notes so far - from what I can tell, this issue seems like it might be related to miniflare in that it's not supporting any usage of connectors. Not just from this package, but even from wagmi. I've tried replicating this with just a pure wagmi implementation by providing the following configuration (see below) and it is also crashing. I'll continue to see if I can find out more information on what changed and how we can proceed. const config = createConfig({
autoConnect: true,
connectors: [
new MetaMaskConnector({chains}),
new CoinbaseWalletConnector({chains, options: {appName: 'Test app'}}),
],
publicClient,
webSocketPublicClient,
}); |
@QuintonC Unfortunately, that version seems to break my bundle too. Not entirely sure what's going but looks like the CSS just doesn't get compiled in the correct way. Noted, thanks for confirming the issue. If you find any more information or other possible workaround I would love to hear them, thanks! |
When you say your bundle is broken do you mean that your store doesn't run/render at all or is it just CSS related? Do you have a sample repo I can pull down and run or some other data I can take a look at such as a deployment url / development preview url? |
@QuintonC yeah, sorry - just seems like its not loading my css correctly. I'm working on a private project for a client but I can probably generate you a preview link. I'll message you on twitter. |
@QuintonC can you follow me on twitter so I can message you: https://twitter.com/justhenricks Lmk if there's a better way - i just can't send a public link here for this project for you to check out. |
@JustinHendricks You're including the CSS for the tokengate + connect-wallet components in your I'd prefer to keep the conversation to resolving the bug to this Github issue in case other developers run into the same issue. Hopefully you can understand :) |
No worries - I just can't share the example project I have here is all. I am including that CSS - I meant like when I downgrade my Hydrogen-CLI none of my CSS seems to load, and the entire site breaks. I feel like there is a difference between 4 and 5 with how the CSS gets bundled and served via Oxygen or something. |
Is this behavior occurring both in your local environment and in your development previews for Hydrogen deploys? Can you also provide more information about your Hydrogen storefront? Is it using Tailwind or something else? Lastly, can you perhaps share your |
Hey @justinhenricks, just wanting to check in with you and see if you're still facing these issues |
@QuintonC hey there - sorry for the delay have been on vaca and something came up today to get me out of the office. Haven’t gotten a chance to get back into this just yet - would love to be able to carry on with the latest CLI version though. This project is for a client and I have a deadline unfortunately so wondering if you have any ideas on alternate libraries I should look into to try and roll an alternative way of handling the wallet connect/validation? Or if there might be a patch coming into this package shortly? I’m fairly new to this world so appreciate any help/advice you might be able to offer. Also - should have some time tomorrow to explore what you have suggested with downgrading the CLI and give you some more insight like the links in root and whatnot. |
@QuintonC it looks like when i use hydrogern CLI This is my links in root:
I am using tailwind |
What does your |
Is it not working because CLI 5 handle the .env for me? Do I just need to create a .env file? Seems like it would still work in the oxygen preview environment if that was the case, right? |
@QuintonC messed around a bit tonight with the wallet connect web3modal just following the instructions in the docs That setup seems to work fine and I am able to connect to a wallet and Apologies as I'm a bit ignorant to this stuff still - but do you see any issues with just proceeding with this for handling my wallet connections? Do you see any way of combining this web3wallet connect with your Appreciate the help. |
@justinhenricks Hmm, the remix config looks fine to me. In regards to using Wallet Connect Web3Modal versus our package, that's fine :) You can most certainly place any button you'd like into the Tokengate I'm also looking into this a bit more to see what we can do to resolve this issue being present in the most recent hydrogen versions. I'm not certain what it is that is causing it and if it is a result of miniflare or something else. I'll keep this issue open as I dive a bit deeper to figure out what is going on here. |
@QuintonC thanks - spent the day getting Web3Modal working with good success. Once I got the account back, generated a signature (with the help of I got so close to being able to just use
But, unfortunately broke my deploy. These were the logs:
The "could not resolve "@shopify/tokengate" " is especially interesting, because it is definitely in my package and working locally like I said, so I couldn't quite figure out why that was happening. Hope this has been helpful, look forward to hopefully seeing this get back in action, after going through all this I can definitely say that your abstraction on this stuff will be awesome to have! |
That is... strange. I'll see if I can find out more about that once I get a replicable issue put together. In my testing so far, I've found that I can't create a websocket client using viem. Additionally, I can't attempt to render a
Thanks! I definitely want to see this functional inside of Hydrogen. It's really bizarre to me that something seems to have broken between the hydrogen releases for this package 🤔 |
From the tutorial
When I am setting up my
<WagmiConfig>
config:Like:
And then go to run my dev server I am getting:
TypeError: Object prototype may only be an Object or null: undefined
And the server won't start.
If I remove the
buildConnectors
call and pass<WagmiConfig>
a basic config like from their docs:The app will run. Any idea what's going on?
The text was updated successfully, but these errors were encountered: