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

Package is incompatible with Astro's Cloudflare adapter #6

Open
jrencz opened this issue Sep 22, 2024 · 0 comments
Open

Package is incompatible with Astro's Cloudflare adapter #6

jrencz opened this issue Sep 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jrencz
Copy link

jrencz commented Sep 22, 2024

Hi,

This is not necessarily a "bug", but that's the only issue template available.

I tried combining this package with https://docs.astro.build/en/guides/integrations-guide/cloudflare/ but with no success. It, and its dependencies don't follow the requirement to

have all node internals' specifiers prefixed with node:.

Here's a list of those that might be prefixed and may get this closer to working in workers environment:

  • assert
  • path
  • crypto
  • util
  • buffer
  • stream

But I also see those:

  • fs
  • fs/promises
  • os

and those don't have support in Cloudflare (see https://developers.cloudflare.com/workers/runtime-apis/nodejs#nodejs-api-polyfills)

There's also a dependency on https://www.npmjs.com/package/snappy and it's a hard no-go for Workers runtime, because it's written in Rust and is published as NAPI node extension.

Question: is making this package compatible with workers (or extracting its subset which might at some point become) is considered "in scope"?

@jrencz jrencz added the bug Something isn't working label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant