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

feat: prisma integration #161

Open
DennisVanIngen opened this issue May 11, 2023 · 2 comments
Open

feat: prisma integration #161

DennisVanIngen opened this issue May 11, 2023 · 2 comments

Comments

@DennisVanIngen
Copy link

DennisVanIngen commented May 11, 2023

Current Behavior

when creating a qwik nx project and adding prisma with npx qwik add. Pages that use the prisma client crash.

Expected Behavior

Should support the prisma integration

GitHub Repo

No response

Steps to Reproduce

  1. create qwik nx project
  2. add prisma using npx qwik add
  3. go to /users page

Nx Report

nx : The term 'nx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
At line:1 char:1
+ nx report
+ ~~
    + CategoryInfo          : ObjectNotFound: (nx:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Failure Logs

Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues
    at new PrismaClient (C:\projects\com-toolsensei\node_modules\.prisma\client\index.js:3:11)
    at Function.Lu (file:///C:/projects/com-toolsensei/dist/apps/dashboard/server/entry.preview.mjs:306:734)
    at Function.W (file:///C:/projects/com-toolsensei/dist/apps/dashboard/server/entry.preview.mjs:27:5038)
    at file:///C:/projects/com-toolsensei/dist/apps/dashboard/server/entry.preview.mjs:31:2261
    at R (file:///C:/projects/com-toolsensei/dist/apps/dashboard/server/entry.preview.mjs:25:1493)
    at file:///C:/projects/com-toolsensei/dist/apps/dashboard/server/entry.preview.mjs:31:2167
    at Function.p [as __qrl] (file:///C:/projects/com-toolsensei/dist/apps/dashboard/server/entry.preview.mjs:31:2380)
    at file:///C:/projects/com-toolsensei/dist/apps/dashboard/server/entry.preview.mjs:16:716
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 0)

Additional Information

No response

@dmitry-stepanenko
Copy link
Contributor

Hey @DennisVanIngen, we're not supporting prisma integration as of now. And unfortunately you won't be able to use qwik cli to add it, because the structure of Nx and standalone repos are incompatible. The best what I can suggest as of now is creating a dummy qwik project, run an integration there and copy changes in the other project you need. Don't forget to adjust paths accordingly. If you struggle with anything while doing it, let me know, I'll try to help.

Meanwhile I'm going to keep this ticket to track actual prisma integration

@dmitry-stepanenko dmitry-stepanenko changed the title Preview crash: @prisma/client did not initialize yet feat: prisma integration Jun 2, 2023
@DennisVanIngen
Copy link
Author

@dmitry-stepanenko I forgot about this issue. I managed to get prisma working in my project by adding a prisma folder in the root of the project. But now converting to drizzle :)

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

No branches or pull requests

2 participants