-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Posting here because I am frustrated with this
There is an SSR implementation, but it's only been tested on NextJs, so when I run it on Cloudflare with SSR, it says:
✘ [ERROR] Build failed with 1 error:
✘ [ERROR] Could not resolve "ws"
.wrangler/tmp/pages-26WKBT/chunks/MainLayout_DoaPMGBA.mjs:176179:239:
176179 │ ...<"u"?self.WebSocket:require("ws"),w$7=()=>typeof WebSocket<...
╵ ~~~~
You can mark the path "ws" as external to exclude it from the bundle, which will remove this
error and leave the unresolved path in the bundle. You can also surround this "require" call with
a try/catch block to handle this failure at run-time instead of bundle-timeThis is because the crossmint/client-sdk-react-ui for some reason has a top-level require of "websockets", which, Cloudflare does not provide as it is not Node
Can we get an edge runtime, or maybe remove that final require and disable websockets / check for their availability or something?
This is using Astro SSR
Metadata
Metadata
Assignees
Labels
No labels