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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Node dependencies prevent SSR (like Remix) on Cloudflare Pages #85

Closed
2 tasks done
jgentes opened this issue Dec 31, 2023 · 3 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@jgentes
Copy link

jgentes commented Dec 31, 2023

馃憻 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 cause Uncaught ReferenceError: window is not defined due to the use of node_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?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@eldadfux
Copy link
Member

Update: we have a pending PR with a fix for this here: appwrite/sdk-generator#799

@stnguyen90
Copy link
Contributor

@stnguyen90
Copy link
Contributor

Closing as a duplicate of #53

@stnguyen90 stnguyen90 closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 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

4 participants