node:crypto not supported (in cloudflare pages)

Hey everyone, I am on cloudflare pages project with sveltekit and during build I get error of node:crypto not supported and the workaround or fix for now is to use node_compatibility flag, it works but should not it work without these flags? Also the PR for this case was merged : https://github.com/better-auth/better-auth/pull/456 Where am I going wrong? I have a plain project with better-auth setup (latest version)
1 Reply
SheldonFromBBT
SheldonFromBBTOP3w ago
Well, it turns out deleting the .npmrc file which contained engine-strict=true fixed this issue, it's weird but it did cause the above issue, for now it's not necessary to add node_compatibility flag.

Did you find this page helpful?