SQL with Prisma under Electron #9129
-
|
My Main goal is to create an Electron App (Windows) that locally stores data in an SQLite Database. And because of type safety I choose to use the Prisma framework instead of other SQLite Frameworks. 1. PrismaClient is unable to be run in the BrowserI executed npx prisma generate and then try to execute this function via a button: When executing this in Electron I get this: It somehow seems logical that Prisma cannot run in a browser. But I actually build a native app - with Electron that embeds a Browser. It seems to be a loophole. 2. BREAKING CHANGE: webpack < 5 used to include polyfillsSo i found this Question: https://stackoverflow.com/questions/64088437/how-to-use-prisma-with-electron And this repeats with 18 other modules. Since the error message to begin with was different I also doubt that this is the way to go. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Prisma cannot be used on the Browser end. You need to run Prisma on the Node side of things and communicate with the UI using IPC. Have a look at these discussions and see if anything relevant is included: |
Beta Was this translation helpful? Give feedback.
-
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
Beta Was this translation helpful? Give feedback.
@RobinNiemann 👋
Prisma cannot be used on the Browser end. You need to run Prisma on the Node side of things and communicate with the UI using IPC. Have a look at these discussions and see if anything relevant is included:
#5200
#7889