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

Unable to get DMMF from Prisma Client #720

Closed
nenadfilipovic opened this issue Jul 6, 2021 · 13 comments
Closed

Unable to get DMMF from Prisma Client #720

nenadfilipovic opened this issue Jul 6, 2021 · 13 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug.
Milestone

Comments

@nenadfilipovic
Copy link

nenadfilipovic commented Jul 6, 2021

  1. Prisma version (prisma -v or npx prisma -v):
prisma               : 2.26.0
@prisma/client       : 2.26.0
Current platform     : debian-openssl-1.1.x
Query Engine         : query-engine 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine     : migration-engine-cli 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary        : prisma-fmt 9b816b3aa13cc270074f172f30d6eda8a8ce867d (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 9b816b3aa13cc270074f172f30d6eda8a8ce867d
Studio               : 0.408.0
Preview Features     : orderByRelation
  1. Logs from Developer Tools Console or Command line, if any:
Unable to get DMMF from Prisma Client:  AggregateError: 
    Error: Generator at /workspace/node_modules/prisma/build/utils/stub-generator.js could not start:
    internal/modules/cjs/loader.js:883
      throw err;
      ^
    Error: Cannot find module '/workspace/node_modules/prisma/build/utils/stub-generator.js'
        at internal/main/run_main_module.js:17:47 {
      code: 'MODULE_NOT_FOUND',
      requireStack: []
    }
        at Timeout._onTimeout (/workspace/node_modules/prisma/build/index.js:103184:22)
    at next (/workspace/node_modules/prisma/build/index.js:16071:22)
    at /workspace/node_modules/prisma/build/index.js:16084:13
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
  1. Does the issue persist even after updating to the latest prisma alpha? (npm i -D @prisma/cli@dev)

There is no error, but it installs 2.16 version, and there is warning in console to uninstall it and install prisma, which I already have installed.

There was no error and studio was working before last prisma update 2.26

@nenadfilipovic
Copy link
Author

Studio works when I revert prisma to 2.25.0.

@sdnts
Copy link
Contributor

sdnts commented Jul 8, 2021

Hey @nenadfilipovic, could you also give the dev version a shot? I changed something that should fix this. You can do so by running npm install prisma@dev @prisma/client@dev.

dev versions are an internal release channel. They get promoted to production, so if you can confirm that this is fixed on dev, then it should also be fixed with the next release!

I wouldn't recommend staying on dev though, since it occasionally contains unannounced breaking changes.

@sdnts sdnts self-assigned this Jul 8, 2021
@sdnts sdnts added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. labels Jul 8, 2021
@sdnts sdnts added this to the 2.27.0 milestone Jul 8, 2021
@sdnts
Copy link
Contributor

sdnts commented Jul 8, 2021

Ah nevermind, I'm still seeing this. This only happens when you have a nexus-prisma generator defined, correct? I'll investigate this now

@nenadfilipovic
Copy link
Author

Yea I use nexus-prisma.

@nenadfilipovic
Copy link
Author

Same error with 2.27.0

@Manubi
Copy link

Manubi commented Jul 14, 2021

same problem with me.

@nenadfilipovic
Copy link
Author

nenadfilipovic commented Jul 14, 2021

@Manubi if you need Studio, generate types then comment out

generator nexusPrisma {
  provider = "nexus-prisma"
}

from schema, you dont need to remove preview features, and you will be fine until you need to change schema, then repeat. Works with 2.27.0.

@Manubi
Copy link

Manubi commented Jul 14, 2021

@Manubi if you need Studio, generate types then comment out

generator nexusPrisma {
  provider = "nexus-prisma"
}

from schema, you dont need to remove preview features, and you will be fine until you need to change schema, then repeat. Works with 2.27.0.

Hey!
Thanks for the info. But @madebysid is working on a fix and Studio is working with prisma 25.0.0 only the desktop app is not running.
cheers

@runia1
Copy link

runia1 commented Jul 15, 2021

This is also affecting me. Just installed nexus-prisma tonight. This probably is unrelated but worth noting.. idk maybe the right set of eyes will see this comment.

When I first installed nexus-prisma and added the generator section to my prisma.schema it failed when I ran npx prisma generate. The error message was around not being able to resolve the ts-node package. Once I installed ts-node it was able to generate the nexus types. I looked at the package.json of nexus-prisma and it looks like ts-node is listed as a dev dependency. I'm wondering if that needs to be listed as a regular dependency or a peer dependency or something. Like I said I doubt it's related but you never know.

@sdnts sdnts modified the milestones: 2.27.0, 2.28.0 Jul 15, 2021
@sdnts
Copy link
Contributor

sdnts commented Jul 15, 2021

Hey @nenadfilipovic @Manubi @runia1, I've just pushed out a dev version that should fix this. Could you try updating your Prisma CLI (and Client) version to 2.28.0-dev.5 and try again? (You can also just run npm i prisma@dev @prisma/client@dev)

Do note that dev versions are mostly meant for internal use, and might contain unannounced breaking changes, so I'd recommend sticking with a stable Prisma version for your app.

If someone can confirm that this dev version fixes this issue, I'll close this. The fix will make it to stable with the next Prisma release (unfortunately that'll be on July 27th, so it's still some time away)

@sdnts
Copy link
Contributor

sdnts commented Jul 15, 2021

@runia1 if you're seeing this outside Studio, this might be a bug with nexus-prisma. Could you create an issue on https://github.com/prisma/nexus-prisma?

@nenadfilipovic
Copy link
Author

Yea, it works @madebysid

@sdnts sdnts closed this as completed Jul 15, 2021
@runia1
Copy link

runia1 commented Jul 20, 2021

Can confirm the dev.5 version fixes this issue. 💪

Also sorry for commenting the other issue here, was a late night and I was tired.. haha

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

4 participants