prisma generate hangs
Whenevery i run prisma generate, the process just hangs. I'm using the latest version (just installed it) in a deno monorepo.
This is my schema:
And attached is the output from
DEBUG=* deno run -A npm:prisma generate
.
Any prisma wizards able to help? š¤6 Replies
You selected the bot's instantaneous insights. Let me compile your answer right away!
Based on the information provided in the knowledge sources, there are a few potential reasons why
prisma generate
might be hanging in your Deno project. Let's go through some possible issues and solutions:
1. Deno Preview Feature: You're correctly using the "deno" preview feature in your schema, which is necessary for Deno support. However, Deno support is still in preview and may have some issues.
2. Output Location: Your output
is set to "../node_modules/generated", but Deno doesn't use node_modules. You might want to change this to a more Deno-appropriate location.
3. Environment Variables: Make sure your PRISMA_DATABASE_URL
environment variable is correctly set and accessible to Deno.
4. Prisma Version: Ensure you're using a recent version of Prisma that supports Deno. The issues mentioned in the knowledge sources were with older versions.
5. Deno Version: Make sure you're using a recent version of Deno. Some older issues were related to specific Deno versions.
6. Generator Process: The debug output you mentioned (but didn't provide) might show more details about where the process is hanging. Look for lines mentioning "GeneratorProcess" for clues.
Here are some suggestions to try:
1. Change the output location in your schema:
2. Run the generate command with the --data-proxy
flag:
3. If the above doesn't work, try running the command twice. Some users reported that running it a second time resolved the issue Github Issue #20572.
4. Check if there are any issues with your .env
file or environment variables. Make sure PRISMA_DATABASE_URL
is correctly set.
5. If possible, try generating the client outside of your Deno project first, then move the generated files into your project.
If
none of these solutions work, it would be helpful to see the full debug output you mentioned. The hanging issue could be related to specific errors or processes that are visible in the debug logs.
Remember that Deno support for Prisma is still in preview, so you might encounter issues that haven't been fully resolved yet. If the problem persists, consider opening an issue on the Prisma GitHub repository with your full configuration and debug output.
š¤ Alright, thanks for letting us know that there's still some help needed. A team member will reply to you shortly.
In the meantime, please let us know any additional info, questions, or which parts of the answer may need clarification.I don't think the AI can see the file i attached
Everything "works" besides
prisma generate
command. All types etc. are working correctly.
When i edit the prisma scheme and re-run the generate command, types are also updated correctly.
It has to be something else that the generate command is doing
Hey š
If I understand correctly, the
npx prisma generate
process just hangs and nothing happens. You don't get any errors?
And the app also works fine. It is just that the process never completes?Yea that's correct - no errors it just hangs.
I'm running
deno run -A npm:prisma generate
(not npx)(i have to ctrl + c to stop it)
