question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use Prisma package if built into custom directory

See original GitHub issue

Here’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:closed
  • Created a year ago
  • Reactions:1
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
stalniycommented, Sep 26, 2022

updated docs

1reaction
ravi0liicommented, Sep 23, 2022

Hey, I noticed one issue here. I see that you deprecated PrismaAbility in favor of createPrismaAbility 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 the PrismaAbility is still used there. I think that the documentation should be updated as well since this is quite confusing now

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found