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 can't find client #708

Closed
nailuj29 opened this issue Jun 12, 2021 · 3 comments
Closed

Prisma Studio can't find client #708

nailuj29 opened this issue Jun 12, 2021 · 3 comments

Comments

@nailuj29
Copy link

  1. Prisma version (prisma -v or npx prisma -v):

  2. Logs from Developer Tools Console or Command line, if any:

Environment variables loaded from ../../../.env
Prisma schema loaded from prisma/schema.prisma
Prisma Studio is up on http://localhost:5555
Unable to get DMMF from Prisma Client:  Error: Cannot find module '@prisma/client'
Require stack:
- /home/nailuj29/.config/yarn/global/node_modules/prisma/build/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
    at Function.resolve (node:internal/modules/cjs/helpers:99:19)
    at eval (eval at resolvePrismaClient (/home/nailuj29/.config/yarn/global/node_modules/prisma/build/index.js:110600:75), <anonymous>:1:9)
    at PCW.resolvePrismaClient (/home/nailuj29/.config/yarn/global/node_modules/prisma/build/index.js:110600:75)
    at PCW.getDMMF (/home/nailuj29/.config/yarn/global/node_modules/prisma/build/index.js:110427:41)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async PrismaService.respond (/home/nailuj29/.config/yarn/global/node_modules/prisma/build/index.js:110692:50)
    at async /home/nailuj29/.config/yarn/global/node_modules/prisma/build/index.js:110867:35 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/nailuj29/.config/yarn/global/node_modules/prisma/build/index.js'
  ]
}

  1. Does the issue persist even after updating to the latest prisma alpha? (npm i -D @prisma/cli@dev)
    yes
  2. Prisma schema (if relevant):
n/a
@ducdev
Copy link

ducdev commented Jun 13, 2021

Same here.

--

Oops, I realized that both you and I are using global installed prisma, it couldn't find the global installed version of @prisma/client, that's why. Let's avoid using it, do it again with npx prisma studio.

Good luck!

@nailuj29
Copy link
Author

That worked, thanks! It might be useful to have globally-installed Prisma use the local @prisma/client if a schema exists

@sdnts
Copy link
Contributor

sdnts commented Jun 14, 2021

Hey @nailuj29gaming @ducdev this is most definitely a bug, since Studio should be able to launch from a global installation as well.

This looks like the same issue as #703 then, so I'll close this one just to keep things manageable for myself. Please let me know if I misunderstood and I will reopen!

@sdnts sdnts closed this as completed Jun 14, 2021
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

3 participants