3 ms·
They don't run every node API. I was trying to install posthog serverside the other day with remix which was to be hosted on workers but received several error
by kylehotchkiss 4y ago
They don't run every node API.
I was trying to install posthog serverside the other day with remix which was to be hosted on workers but received several errors about buffers not being available.
This all said, isolates have been really cool to work with. Being able to run lightweight code at the edge has opened a unique set of opportunities like dynamically routing things quickly even for static sites.
- steelbrain 4y agoThis is intentional IIRC. Node is a Javascript runtime, has competitors like Deno with very different APIs. Cloudflare has gone the route of being as close to the ES spec as possible instead of committing to any specific runtime APIs. For the case at hand, It doesn’t support buffer APIs but supports ArrayBuffers, so you can build on top of it. You can use any off the shelf browserify/buffer shim package to work it around.