Can't use Prisma package if built into custom directory
See original GitHub issueHere’s a repro of type errors with Prisma 3.14 (same with 3.0.2) https://codesandbox.io/s/cranky-frog-dy6nfq?file=/src/index.ts
No typesafety for conditions with AbilityBuilder
and type error with raw rules.
I believe the reason is that typings depend on types from @prisma/client
, but that doesn’t exist in all the prisma usage scenarios
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Generating the client (Concepts) - Prisma
This page explains how to generate Prisma Client. It also provides additional context on the generated client, typical workflows and Node.js configuration.
Read more >Prisma Migrate limitations and known issues
The following limitations apply to Prisma Migrate. MongoDB connector not supported. Prisma Migrate does not currently support the MongoDB connector.
Read more >Prisma CLI Installation (Reference)
The Prisma CLI is typically installed as a development dependency, that's why the --save-dev (npm) and --dev (Yarn) options are used in the...
Read more >Prisma engines
Prisma tools are based on an engine-layer which manages the communication with the database. ... You might want to use a custom library...
Read more >Prisma schema (Reference)
The Prisma schema is the main configuration file when using Prisma. ... in the directory where you invoke the CLI command (or any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
updated docs
Hey, I noticed one issue here. I see that you deprecated
PrismaAbility
in favor ofcreatePrismaAbility
in the same commit as you added the support custom generated prisma clients. You also added additional documentation for the custom generation of the client, but the old documentation regarding the usage of@casl/prisma
is now out of date, since thePrismaAbility
is still used there. I think that the documentation should be updated as well since this is quite confusing now