ps73 / feathers-prisma

A Feathers service adapter for Prisma ORM.
MIT License
38 stars 3 forks source link

Warning when importing: Use "@prisma/client/runtime/library", "@prisma/client/runtime/data-proxy" or "@prisma/client/runtime/binary" #17

Closed robblovell closed 9 months ago

robblovell commented 9 months ago

Steps to reproduce

Use the import:

import { service } from "feathers-prisma";

With either Prisma 4.11.0 or 4.15.0.

Expected behavior

Should not give any warnings about using a deprecated Prisma feature when importing feathers-prisma.

    console.warn
      Use "@prisma/client/runtime/library",  "@prisma/client/runtime/data-proxy" or  "@prisma/client/runtime/binary"

      1 | import feathers from "@feathersjs/feathers";
    > 2 | import { service } from "feathers-prisma";
        | ^
      3 | import { PrismaClient } from "../../client";
      4 | import { ServiceTypes } from "../declarations";
      5 |

      at Object.<anonymous> (node_modules/@prisma/client/runtime/index.js:242:2596)
      at Object.<anonymous> (node_modules/feathers-prisma/dist/error-handler.js:5:17)
      at Object.<anonymous> (node_modules/feathers-prisma/dist/service.js:17:25)
      at Object.<anonymous> (node_modules/feathers-prisma/dist/index.js:18:17)
      at Object.<anonymous> (services/api/accountability/src/services/getService.ts:2:1)

Actual behavior

When this import is traversed at execution time, it gives the warning:

Use "@prisma/client/runtime/library",  "@prisma/client/runtime/data-proxy" or  "@prisma/client/runtime/binary"

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

"@feathersjs/configuration": "^4.5.15",
"@feathersjs/errors": "^4.5.15",
"@feathersjs/express": "^4.5.15",
"@feathersjs/feathers": "^4.5.15",
"@feathersjs/socketio": "^4.5.15",
"@feathersjs/transport-commons": "^4.5.15",
"@prisma/client": "^4.15.0",
"feathers-mongoose": "^8.5.1",
"feathers-prisma": "^0.6.0",
"feathers-rest": "^1.8.1",
"mongodb": "^6.1.0",
"mongoose": "^7.5.3",
"pg": "^8.11.0",
"pg-hstore": "^2.3.4",
"pg-native": "^3.0.1",
"pg-promise": "^10.11.1",
"prisma": "4.11.0" or "4.15.0"

NodeJS version: 16.20.2

Operating System: Mac M1

Browser Version: N/A

React Native Version: N/A

Module Loader: npm

ps73 commented 9 months ago

Prisma V4 will not be supported by this package. Please upgrade Prisma to v5 and use v0.7.0 of this library.