TanStackT
TanStack3mo ago
3 replies
awake-maroon

Server dependency leaking to client?

I have a starter template that worked before: https://github.com/winstonpurnomo/turborepo-starter-v2, but now suddenly doesn't - when I try to load the index page, I get an error: hook.js:608 Module "crypto" has been externalized for browser compatibility. Cannot access "crypto.getCiphers" in client code.

This stems from the @workos-inc/node package, which I only use in server functions. Does anyone have an explanation for if there is a proper way to protect a server-only dependency from seemingly leaking to client?
Was this page helpful?