Skip to content

Incompatibility with Cloudflare Workers #964

Closed
@Pelps12

Description

Although buffer is globally defined in a node environment, in an edge environment like Cloudflare Workers, Buffer has to be imported as "node:buffer". Frameworks like SvelteKit handle the conversion of "buffer" to "node:buffer" internally Link. However, in constructEvent, because Buffer is assumed to be globally defined. Screenshot 2024-02-17 225517

When deployed to Cloudflare, my SvelteKit application's webhook errors out with "Buffer not defined"
Screenshot 2024-02-17 224746

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions