Node crypto using Remix
I get the following error message when running
wrangler pages dev ./public --d1=DB --compatibility-flags=nodejs_compat --compatibility-date=2023-11-27
Uncaught Error: Dynamic require of "node:crypto" is not supported
I set serverPlatform: "node",
in the remix.config.js to get Remix to use the node API locally.
Any advice on how to proceed?1 Reply
Seems this is a problem with a Remix dependency; it requires crypto directly, should be node:crypto to work on cloudflare: https://github.com/tj/node-cookie-signature/pull/50
TLDR: I can't use cookie session storage with Remix on Cloudflare because of this