nexus-plugin-prisma: t.model does not exist
I am trying to upgrade to Prisma 2 with photon and @prisma/nexus based on this documentation, but am running into this error:
How do I use them together now?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 28 (10 by maintainers)
I had the same error for example project. Additionally,
nexuswarned that there is nooutputsfield in object argument passed tomakeSchema. So, firstly, I added that field insrc/schema.ts:After
npm run generate:nexusit created specified files. The wanted definiton was ingenerated/typings.ts:So adding the line
on the top of
src/schema.tsresolved type errors. Anyway, i am not sure this is correct solution)The solution for me was adding the following
Nice 😃
Also,
@prisma/nexus,nexus-prismaandnexusgot me quite confused. The docs are quite outdated but I came to the understanding thatnexus-prismais the Nexus plugin,nexusis Nexus core and@prisma/nexusis deprecated, right? What place regarding docs get updated most frequently? prisma/prisma-examples@prisma2, nexus.js.org or prisma/nexus-prisma’sREADME.md?I am also running into this issue but with
t.crudOh, just saw this comment https://github.com/prisma-labs/nexus-prisma/issues/332#issuecomment-522909480
Congratulations you navigated the confusion well!
Stay tuned, we’ll be doing a sanity pass on docs soon 👍
Reinstalling node_modules did the job for me.
@chenfanggm you shouldn’t need the flag. Or, you may need it once to generate the types needed to typecheck (🐔 🥚 situation).
I’m getting the same issue with
t.crudright now. It’s so strange because I’ve rebuilt my docker environment many times throughout the day today and then all of a sudden I started having this issue. I can’t seem to fix it by going through the suggestion made by @chenfanggm in that other thread by setting:“nexus”: “0.11.7” and “ts-node-dev”: “^1.0.0-pre.40”,
My current setup is: “nexus”: “^0.12.0-beta.6” “@prisma/nexus”: “^0.0.1”, “ts-node”: “^8.3.0”,
Has anyone figured out a winning combination? 😃