Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This library is unreliable and I went back to hacky way of using prisma directly. #63

Open
husayt opened this issue Nov 27, 2024 · 7 comments

Comments

@husayt
Copy link

husayt commented Nov 27, 2024

There are a number of open issues here indicating that let alone building and deploying, but even running dev with this library is pretty much broken. These issues have been open for too long and there has been no progress.

@sorenbs @schickling @ankur-arch I had a hacky solution of getting prisma to deploy to firebase (see below), but that at least worked. Since I have spent a lot of time trying to get it work with this module, and spent many days on that without success and feel that I have been let down very much. I only did it because of the claim on the website that prisma supports nuxt and this is an official library.

Prisma should have a disclaimer saying this library is far from ready and should not state on its website that is supports nuxt until those basic issues are resolved.

Here is my hacky script to prepare a bundle to deploy to firebase:

# move myrpisma outside from node_modules
move .output\server\node_modules\myprisma .output\server\myprisma

# this file is not needed for linux
del .output\server\myprisma\client\query_engine-windows.dll.node

# copy database file to dist folder
copy ..\prisma\dev.db .output\server\myprisma\client

# update package.json in the bundle
powershell -Command "(gc .output\server\package.json) -replace '0.0.0', 'file:../myprisma' -replace 'win32-x64-msvc', 'linux-x64-gnu' | Out-File -encoding ASCII .output\server\package.json"

# Replace inside `.output/server` all 'myprisma/client' to '../myprisma/client/index.js'
node fileReplacer.js

PS it might work with some remote database and specific hosting vendor (I yet need to see working example), but true lacmus test is support of Sqlite on leading platforms (firebase, vercel, cloudflare and etc) as then database needs to be bundled too. So a working example with sqlite and nuxt prisma will be a very good start and milestone.

@ankur-arch
Copy link
Contributor

Hey @husayt 👋,

Thanks for taking the time to share your thoughts. I completely understand your frustration, and I want to address your concerns directly.

First off, PR #30 isn’t being ignored—it’s a draft PR, and progress has been slower because we’ve been working on updating our internal processes for handling Nuxt issues. On that note, I’m still waiting on a reproduction from you, which is crucial for us to tackle this effectively. I know it’s frustrating, but we’re aiming to improve how we handle these cases, which is why it’s taking a bit longer.

As for PR #37, it’s also tied to these process changes. I know it’s been sitting there for a while, but it’ll be addressed soon. These updates are about ensuring issues like this don’t slip through the cracks again.
On the topic of edge runtimes like CF, we’ve documented the current limitations here. Resolving these requires more foundational changes and would need a separate feature request, so it’s something we’re aware of but can’t tackle immediately.

I hear you when you say these issues aren’t overly complicated but have been lingering too long. It’s fair criticism, and we’re actively working to change that. For context, I’ve been engaging with user feedback—like this GitHub comment—to make sure we prioritize the right things. We’re also finalizing a new process for handling Nuxt-related issues, which should be in place in the next two weeks and will help streamline this kind of work.

Your hacky solution is clever, and I appreciate the effort you’ve put in to make things work. I assure you we’re committed to making the official Nuxt integration as reliable and seamless as you expect it to be. Thanks for sticking with us and for pushing us to do better.

@husayt
Copy link
Author

husayt commented Nov 27, 2024

@ankur-arch thank you for reply. As for you wating for my reproduction, to be honest I have already spent ten times the amount of time I allocated here and simply run out of time. But you don;t even need that, there are a lot of low hanging issues here (like, pnpm or windows support) which don't need any reproduction and could be a good start. As for serverless environments, I don't even expect that, I still can't get even local build working let alone some serverless.

I would suggest to start from the other end, rather than fixing some one else's one problem, try to come with working example of nuxt/prisma with sqlite and npm/pnpm, which one can run and build locally at least on both win/linux. This can be a good test if library is able to do what it claims and will be a fare thing to put in front of users, before asking them to commit using this library, provided how many tried this and failed to get it working.

@nemvince
Copy link

nemvince commented Nov 28, 2024

Any known workarounds? Would love to use the module as it seems really convenient, but I get the same error using pnpm.

@ankur-arch
Copy link
Contributor

Any known workarounds? Would love to use the module as it seems really convenient, but I get the same error using pnpm.

Hey @nemvince,

Apologies for the delayed response! Could you try manually installing prisma and @prisma/client using pnpm, then generate the Prisma client with pnpm as well? Let me know if that resolves the issue.

I'll continue working to improve the experience with other package managers.

@husayt
Copy link
Author

husayt commented Dec 4, 2024

this library is not working well with pnpm. what is the point of trying again? #30 is still waiting for you to review. once that merged, maybe we could try again.

You mentioned delays, but from what i see, there is no active work here. Even PRs from the community are ignored.

I am sorry for being blunt, but it is not really helpful to release a broken library to the public domain and then keep promising that issues will be looked , whereas there was no visible work here for a long time

@jharrell
Copy link
Member

Hi @husayt !

Thank you for the feedback. I agree that it can be frustrating to find software, try to use it, and then not get anywhere. We, of course, want to improve this module so that it works in more contexts.

@ankur-arch has been in charge of this and has improved things where he can. However, this is not his only responsibility and he must spend time outside of this module. That is why he is asking for outside reproductions, pull requests, and assistance.

That all being said, please do treat this as pre-release software. There will be bugs, we will fix them.

Thank you for your time and patience 🙏

@husayt
Copy link
Author

husayt commented Dec 14, 2024

Hi @jharrell,

Thank you for your reply. My previous message wasn't just anger venting. While I appreciate your response, I believe all of us reporting issues here feel badly let down.

You wrote:

That all being said, please do treat this as pre-release software.

This was never mentioned in the message from Prisma. I understand the marketing and all, but I wouldn't have started using this library if there had been a warning that it wasn't ready for production. I only came here because of this article on the Prisma website, which praises the Nuxt support in Prisma.

Before this, we spent a lot of time finding a working, albeit hacky, solution to deploy Prisma with SQLite to Firebase. When it was announced in this article by @ankur-arch that Prisma supports Nuxt, we thought it would be better to use the official module rather than our hacky but functional solution. Since then, we have spent not hours or days, but weeks resolving issues with this library, only to encounter more and more problems. We switched from pnpm to npm because the library still doesn't support pnpm (there is a PR that, for some reason, hasn't been accepted after so many months). We switched to Linux because Windows wasn't supported. Instead of one hack, we ended up with many workarounds to get this library working, and it still doesn't work. It always seemed like it was just about to work, and we kept trying, which I admit was our big mistake.

That is where my frustration comes from. We thought that, as an official library from Prisma, it would meet certain quality and standards. But it is far from that, and the worst part is that Prisma announced it as production-ready, when even you admit here (but not on the official website) that this is pre-release software.

Here are the three main concerns:

  1. No Warning About Production Readiness: There is no warning anywhere that this software is not ready for production. This misled us into believing it was stable and ready for use.
  2. Lack of Progress: There has been very little progress on this over the last 6 months. Checking the commit log reveals minimal activity, which is disappointing given the issues we've encountered.
  3. Community PRs Not Addressed: Whenever the community steps up and provides PRs due to the lack of progress by the core team, these PRs are not addressed and are left open for a long time. Not only is Prisma not committing enough resources, but it is also stalling community efforts to move this project forward.

Am I not right to be upset? If this were @ankur-arch's personal project, that would be different, but this is Prisma's own repo, and @ankur-arch is a member of the team. My criticism is not directed at @ankur-arch personally, but rather at Prisma as an organization, which has let us down with this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants