Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
accessing prisma generated enums on browser client - Prisma
P
Prisma
•
2y ago
•
3 replies
Slim Shady
accessing prisma generated enums on browser client
in my prisma schema I have an enum called
Sizes
Sizes
with the values of
s
s
,
m
m
,
l
l
,
xl
xl
i can access that enum in on the server by importing
import { Sizes } from "@prisma/client";
import { Sizes } from "@prisma/client";
but whenever I import the same thing in a svelte file
, the
Sizes
Sizes
become
undefined
undefined
I temporarily fixed it by copying the values of the prisma generated
Sizes
Sizes
but the issue is
, if the enum is updated
, then i need to copy over the values again
Solution
fixed this by passing the values of
Sizes
Sizes
from server to client
Jump to solution
Prisma
Join
The official Discord server of Prisma! Find us online at prisma.io
9,819
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Generated Prisma Client
P
Prisma / help-and-questions
8mo ago
Prisma 7 generated client problem
P
Prisma / help-and-questions
4mo ago
Generated Prisma Client (prisma-client generator) still imports from @prisma/client/runtime/library
P
Prisma / help-and-questions
11mo ago
TypeScript errors with new `prisma-client` generated client
P
Prisma / help-and-questions
12mo ago