-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Using depay/widgets with Remix.run #62
Comments
Any error messages you can share? |
Also if you could setup a test remix app in a fork we could work together on fixing compatibility. I suggest you create a |
Thank you for getting back to me. I've created a bare-bones remix.run app where I'm trying to load the Depay donation widget. You can see/clone it from here: https://github.com/arefay/remix-depay Once you run it you'll see the build errors. Apologies upfront, I'm not the most experienced dev so maybe this is something simple I'm missing, but I'm a bit stuck and would love to solve and use Depay widgets for my next project. |
This appears to be the relevant issue in Remix. The root problem is that @depay/widgets imports some other @depay/ utilities, which themselves import "buffer" and some other node built-ins, which Remix doesn't seem to like. |
Chance's comment here is illuminating. It sounds like this is a known issue with Remix, and it doesn't sound like there's any kind of fix. @spape is there any kind of clever way @arefay could somehow import these @depay widgets, without bringing buffer (or any other Node globals) along in the import graph? Else I think moving to Next might be the only way forward for him :-| |
@arackaf @arefay The trick is to use a bundled version. See working example here: 10xSebastian/remix-depay@cc136a1 Screen.Recording.2022-08-12.at.08.35.56.mov |
@spape oof - thanks a ton! I actually poked around those UMD builds, but I didn't think they'd work. The umd build for web3-client made the same import (via require) on buffer, so I assumed it would similarly fail. Thanks so much for debugging this! |
Not sure if this is the right place to ask this question, but wanted to check if anyone has been able to get the @depay/widgets running in a Remix.run project? I'm having little success, for one because there are no typings available, but even skipping those I'm not able to successfully compile the project.
The text was updated successfully, but these errors were encountered: