Replies: 2 comments 9 replies
-
Hey @arefay 👋, Could you provide a more complete code snippet so I can get the full picture? |
Beta Was this translation helpful? Give feedback.
6 replies
-
For anyone else having similar issues, setting the type as
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a simple model which includes a
createdAt DateTime @default(now())
column, generating a SQLite db.
I'm using Remix.run to fetch some rows using a loader function and .findMany(), to then populate some objects, e.g.
type LoaderData = { project: Project; }
and convert to json using Remix.run's json function
return json(data);
This was all working fine until I updated npm, prisma all to latest and now all my React components show errors related to the "DateTime" column not being converted correctly?
Types of property 'createdAt' are incompatible.\n Type 'string' is not assignable to type 'Date'.",
Oddly I'm actually not getting any build errors using npm run dev, but i'm getting all the squiggly red lines on all my React components now where I'm trying to pass an object with a DateTime column from my prisma schema.
Has anyone come across this yet? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions