Skip to content

Bug: Prisma Plugin throws TypeError: prisma.$use is not a function #208

@sakshiarora386

Description

@sakshiarora386

Bug: Prisma Plugin throws TypeError: prisma.$use is not a function

Version Information

  • CLI Version: 2.9.13
  • Plugin Version: 3.0.1

Current Behavior

When running a Godspeed project with the serve command, the Prisma plugin crashes with the following error:

TypeError: prisma.$use is not a function

$use is being used in the godspeed prisma plugin to use prisma-field-encryption middleware since Feb. 2024.
df08a79

Earlier it was working fine but now its throwing an error because in Aug 2025, prisma has removed $use in their minor release v6.14.0
prisma/prisma#27891

Steps to Reproduce

  1. Create a new Godspeed project
  2. Install the Prisma plugin
  3. Generate CRUD APIs
  4. Run the project using godspeed serve

Expected Behavior

The project should start successfully and the Prisma datastore should be usable without errors.

Actual Behavior

The project crashes immediately with the error:

Could not load prisma client schema
TypeError: prisma.$use is not a function
    at DataSource.<anonymous> (C:\Users\acer\Desktop\my-real-estate-backend\node_modules\.pnpm\@godspeedsystems+plugins-pr_cc9b365a33ccfc0e25e23f23a3be1df9\node_modules\@godspeedsystems\plugins-prisma-as-datastore\dist\index.js:101:20)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\acer\Desktop\my-real-estate-backend\node_modules\.pnpm\@godspeedsystems+plugins-pr_cc9b365a33ccfc0e25e23f23a3be1df9\node_modules\@godspeedsystems\plugins-prisma-as-datastore\dist\index.js:5:58)

Screenshots / Screencast

Image

Possible Solution

  • Update the Prisma plugin code to remove usage of the deprecated $use method.
  • Migrate the middleware logic to Prisma Client extensions

Keywords

$use, prisma, deprecated, godspeed, plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions