misterpoppins
CDCloudflare Developers
•Created by misterpoppins on 5/10/2024 in #pages-help
Wrangler deploy shows success but actually fails
9 replies
CDCloudflare Developers
•Created by misterpoppins on 4/29/2024 in #pages-help
ERROR: Could not resolve "crypto"
I'm using HonoJS with the library Hono Sessions. When I use wrangler to preview
wrangler pages dev dist
I get an error complaining about not being able to resolve crypto:
For context, I've ensured I have node compatibility enabled:
If I remove any imports of the Hono Sessions library my worker builds...the issue is if I go to that project and run their Cloudflare test, it works totally fine!
The only thing I can think of is they are testing against Cloudflare Workers, not Pages. Is there a difference in the node APIs offered between Workers and Pages?
If not, any thoughts on why this might be happening? If it matters I'm using Vite to build my project.
https://github.com/jcs224/hono_sessions4 replies