Investigate live reload of Prisma Client with `next dev`
See original GitHub issueIf I have a Next.js project running with Prisma Client and have a change in the schema.prisma
file, then generated a new Client with prisma generate
, it would be great, if I don’t have to restart the next dev
process.
Probably clearing the require cache with some code like this would be necessary:
delete require.cache[require.resolve(clientDir)]
delete require.cache[clientDir]
As of now I need to restart the next dev
process by hand, which is a bit cumbersome.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:40
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Investigate live reload of Prisma Client with next dev #3615
If I have a Next.js project running with Prisma Client and have a change in the schema.prisma file, then generated a new Client...
Read more >Best practice for instantiating PrismaClient with Next.js
In development, the command next dev clears Node.js cache on run. This in turn initializes a new PrismaClient instance each time due to...
Read more >Remix, SQLite, and Prisma, Oh my! | Blog - FullStackFish
We should now have a dev.db file in the prisma folder next to our schema.prisma file. Launch prisma studio to see the results....
Read more >How to use Prisma in a Next.js app - Daily.dev
In this post, we will learn how to use Prisma, an ORM for JavaScript and TypeScript, in a Next.js app.
Read more >tRPC - Move Fast and Break Nothing. End-to-end typesafe ...
End-to-end typesafe APIs made easy. Automatic typesafety & autocompletion inferred from your API-paths, their input data, & outputs
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi. @forrestwilkins : I think fixed it by casting to any :
(globalThis as any)["prisma"]
This is a main UX issue with Prisma in Blitz. Would be awesome to have this fixed!!