-
Notifications
You must be signed in to change notification settings - Fork 51
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
RemixJS compatibility issues #17
Comments
First thank you for reminding me that I needed to add the I can't think of a good reason why Remix would include Buffer when you add the library? I will try to find some time later today to have a quick look at it. Thanks for creating that minimal repro.. Impossible to overstate how much of a difference that makes to people maintaining packages :) |
Ugg.. this is an ugly hack by open-telemetry that we run into. They are using The standard If you can make that switch in Remix, that would be a (albeit shitty) workaround for now. I am going to have a think on how best to solve this seamlessly, so that things will work no matter what your bundler picks for you. |
Hmm.. that fix was easier than I thought and slightly uglier than I had hoped.. Cloudflare Workers have a working implementation for Can you confirm that it works in your full example too? |
Thanks for tracking that down so quickly! I'll check the fix out on our full codebase and let you know how it goes. |
Looks like we made some progress. We're able to build now without the buffer error. However, when we visit the root route we get another error from miniflare regarding the async_hooks polyfill:
I updated the example repo, so you should be able to reproduce the issue there. Thanks! |
It is way past my bedtime here, but I had a quick scan and the error is present in the build artifact in I'll try to figure out tomorrow if it is Remix proper because of browser support or if it is the Cloudflare Workers adapter.. |
Sounds good. I agree with you that the issue is likely with how RemixJS is bundling. I'll do a bit of digging there and will reply with any findings. |
Looks like there's a relatively new Remix issue regarding this remix-run/remix#6715 |
That is indeed the issue you are seeing. Mark happens to be a friend of mine. I'll see if I can get in touch with him today or next week to have a chat about it :) |
Ok.. had a long conversation with Mark about Remix and polyfills and how they can best handle this situation. The current plan is for you to have the ability to opt-into exactly the polyfills that you want. That should allow you to opt-out of the He will be keeping the issue on the Remix side updated with a PR and progress once there is more to share. |
Sounds like a good solution. Glad you’re well connected 😄 |
Looks like the fix in remix-run/remix#6814 gets things working for us. We've updated the buffer-issue repo to use the nightly mentioned in the PR. The one clunky bit is that opentelemetry requires |
Well.. good to see that the fix works at least. But I am quite surprised that opentelemetry requires all these Node dependencies?! Would be worth investigating where that goes wrong. If I grab the buffer-issue repo and remove the polyfills, that should make it fail in the way that you saw right? |
We were surprised too! Yes, if you set |
Looks like the 1.19.0 Remix release fixes this issue. I'll close for now. I appreciate your help! |
I see an error that looks like
when I add instrumentation to a Remix app. I've created a minimal example to reproduce. I see this error whether or not I use the
node_compat
flag inwrangler.toml
. Any help would be appreciated.The text was updated successfully, but these errors were encountered: