Deploying to nuxthub, issue types prisma

Have this error:
Error: Could not load /home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client (imported by server/database/prisma.ts): ENOENT: no such file or directory, open '/home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client'
Error: Could not load /home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client (imported by server/database/prisma.ts): ENOENT: no such file or directory, open '/home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client'
i tried deploy the project using prisma with generated file
6 Replies
kapa.ai
kapa.ai2d ago
Hi @⛧ RedStar ⛧. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It looks like Nitro can’t resolve your Prisma client at build/deploy time (ENOENT for server/database/generated/client). The knowledge sources don’t include a NuxtHub + Prisma guide or a fix for this exact path setup, so I can’t provide a definitive solution. However, two relevant points: - Nuxt Content v3 + NuxtHub use database adapters (e.g., D1/Postgres/LibSQL) and are designed to avoid bundling file-based DB clients in serverless/edge. If you’re deploying a Content app to NuxtHub, prefer the built-in database integration instead of Prisma-generated clients (NuxtHub enables a D1 binding by default when using Content) (Nuxt Content v3 announcement, NuxtHub deploy docs).
- When deploying to serverless targets, Nuxt builds a preset-specific output. Ensure your build runs after preparing the project types/config. In CI/Docker contexts, running nuxt prepare before build often fixes missing-generated-artifacts issues (Build order note). Given the above, try: - Verify the Prisma output path matches your imports. The error path suggests you import from server/database/generated/client, but the generated client may be elsewhere (not covered by our sources). - Ensure your CI runs prisma generate before nuxt build, and run nuxt prepare just before build: - prisma generate - nuxt prepare - nuxt build (Build order tip). If you’re using Nuxt Content on NuxtHub, consider switching to Content’s database configuration (e.g., D1/Postgres/LibSQL) instead of Prisma, since Content v3 is optimized for serverless and handles DB adapters automatically on NuxtHub (serverless deploy guide, NuxtHub deploy). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2d ago
<@605162125027049472> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
kapa.ai
kapa.ai2d ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Thanks for the link. From the provided sources, I can’t see a NuxtHub-specific Prisma setup or a confirmed fix for your path error. However, two actionable checks align with the sources: - Ensure Nuxt preparation runs in CI after your full project is available. In Nuxt 4, running nuxt prepare before nuxt build can be necessary to generate types and resolve imports correctly in CI/Docker flows (noted by Nuxt maintainers; run after checkout and prisma generate) ("How to regenerate .nuxt folder"). - Verify your deployment target expectations: NuxtHub/Content are optimized for serverless DB adapters (D1/Postgres/LibSQL) and avoid bundling local Prisma clients. If you’re deploying a Content app to NuxtHub, prefer the built-in DB config instead of Prisma, since NuxtHub enables a D1 binding by default when using Content ("Deploy with Serverless", "NuxtHub deploy"). Suggested CI order: - prisma generate - npx nuxi prepare - npx nuxi build If the error persists, the sources don’t provide further NuxtHub+Prisma guidance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2d ago
<@605162125027049472> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
micbianchi97
micbianchi972d ago
Hi @⛧ RedStar ⛧ , thank you for the answer, I noticed that if you use the main file in CSS it works, but if you put it in SCSS it no longer works. I checked and SCSS is installed correctly, so I don't understand why. Do you have any ideas?

Did you find this page helpful?