Closed jgentes closed 1 month ago
Update: we have a pending PR with a fix for this here: https://github.com/appwrite/sdk-generator/pull/799
https://www.npmjs.com/package/node-appwrite/v/12.1.0-rc.4 is now available.
Closing as a duplicate of https://github.com/appwrite/sdk-for-web/issues/53
π Reproduction steps
Using https://github.com/Meldiron/appwrite-ssr-remix from @Meldiron, replace
@remix-run/node
with@remix-run/cloudflare
.The workaround (for Node) is to use
installGlobals
as seen in https://github.com/Meldiron/appwrite-ssr-remix/blob/main/server.ts, however this is not available for Cloudflare as Workers use the V8 runtime.π Expected behavior
The client should not use isomorphic libraries, and instead determine which libraries to use based on the platform. <-- guessing here
π Actual Behavior
Using
import { Client } from 'appwrite'
in a server file will causeUncaught ReferenceError: window is not defined
due to the use ofnode_modules/isomorphic-form-data/lib/browser.js
which does not work on edge (Workers). Pages is built on Workers, so it prevents deployment.π² Appwrite version
Version 0.10.x
π» Operating system
Linux
𧱠Your Environment
No response
π Have you spent some time to check if this issue has been raised before?
π’ Have you read the Code of Conduct?