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

Prisma studio requires having prisma client installed when it shouldn't #703

Closed
m-abdelwahab opened this issue Jun 9, 2021 · 2 comments
Closed
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Milestone

Comments

@m-abdelwahab
Copy link

m-abdelwahab commented Jun 9, 2021

Working through this tutorial, where the steps are:

1.npm i -D prisma
2. npx prisma init
3. npx prisma db push
4. npx prisma studio <- error in this step

Installing prisma client fixes the issue but this is unexpected behavior. Because running db push should install prisma client

  1. Prisma version (prisma -v or npx prisma -v):
prisma               : 2.24.1
@prisma/client       : Not found
Current platform     : darwin
Query Engine         : query-engine 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/query-engine-darwin)
Migration Engine     : migration-engine-cli 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary        : prisma-fmt 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : 18095475d5ee64536e2f93995e48ad800737a9e4
Studio               : 0.397.0

  1. Logs from Developer Tools Console or Command line, if any:
Unable to get DMMF from Prisma Client:  Error: Cannot find module '@prisma/client'
Require stack:
- /Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.resolve (internal/modules/cjs/helpers.js:94:19)
    at eval (eval at resolvePrismaClient (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110600:75), <anonymous>:1:9)
    at PCW.resolvePrismaClient (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110600:75)
    at PCW.getDMMF (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110427:41)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async PrismaService.respond (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110692:50)
    at async /Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110867:35 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js'
  ]
}
reproduction.mp4
@sdnts sdnts self-assigned this Jun 9, 2021
@sdnts sdnts added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. labels Jun 9, 2021
@sdnts sdnts added this to the 2.25.0 milestone Jun 11, 2021
@sdnts
Copy link
Contributor

sdnts commented Jun 14, 2021

This is now fixed in the latest dev version, will be out with tomorrow's release!

@TarakKadia
Copy link

Working through this tutorial, where the steps are:

1.npm i -D prisma 2. npx prisma init 3. npx prisma db push 4. npx prisma studio <- error in this step

Installing prisma client fixes the issue but this is unexpected behavior. Because running db push should install prisma client

  1. Prisma version (prisma -v or npx prisma -v):
prisma               : 2.24.1
@prisma/client       : Not found
Current platform     : darwin
Query Engine         : query-engine 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/query-engine-darwin)
Migration Engine     : migration-engine-cli 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine : introspection-core 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary        : prisma-fmt 18095475d5ee64536e2f93995e48ad800737a9e4 (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash : 18095475d5ee64536e2f93995e48ad800737a9e4
Studio               : 0.397.0
  1. Logs from Developer Tools Console or Command line, if any:
Unable to get DMMF from Prisma Client:  Error: Cannot find module '@prisma/client'
Require stack:
- /Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.resolve (internal/modules/cjs/helpers.js:94:19)
    at eval (eval at resolvePrismaClient (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110600:75), <anonymous>:1:9)
    at PCW.resolvePrismaClient (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110600:75)
    at PCW.getDMMF (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110427:41)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async PrismaService.respond (/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110692:50)
    at async /Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js:110867:35 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/m-abdelwahab/Desktop/prisma-with-supabase/node_modules/prisma/build/index.js'
  ]
}

reproduction.mp4

Thank you. 4th step works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

3 participants