It wont work properly, id recommend moving it to that page's server:
+server.page.ts
The Prisma Client relies on Node.js APIs, which are not available in a browser environment. There maybe some hackish ways to get it to work if you really dont want use a server.