TanStackT
TanStackโ€ข4mo agoโ€ข
11 replies
primary-violet

TanStack Start + Prisma edge + Cloudflare Worker fails during deployment

I am trying to deploy to Cloudfare Workers but getting the following reponse when visiting the deployed site:

{"status":500,"unhandled":true,"message":"HTTPError"}


Seeing this error on the Cloudflare worker side:

HTTPError: No such module "assets/.prisma/client/edge".
  imported from "assets/db-boN08oha.js"Caused by: Error: No such module "assets/.prisma/client/edge".
  imported from "assets/db-boN08oha.js"


and also during the build, see this in the logs:

...
โœ“ built in 4.36s
00:42:17.792    vite v7.1.9 building SSR bundle for production...
00:42:17.797    transforming...
00:42:21.776    ".prisma/client/edge" is imported by ".prisma/client/edge?commonjs-external", but could not be resolved โ€“ treating it as an external dependency.
00:42:27.800    โœ“ 3819 modules transformed.
...


building on the Cloudflare side with:

"build": "npx prisma generate --no-engine && vite build"


Any suggestions on whats going on would be great ๐Ÿ™‚
Was this page helpful?