paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
687 stars 55 forks source link

@prisma/internals >= 5.15.0 missing getSchemaPath - breaks utils package #334

Closed jacobclarke92 closed 3 months ago

jacobclarke92 commented 3 months ago

Just a heads up since they added multi-file schema support it looks like the getSchemaPath function isn't exported from @prisma/internals anymore.

Was getting this error before I realised what was going on, and eventually traced it back to the utils package.

    TypeError: (0 , internals_1.getSchemaPath) is not a function

Oddly enough after I downgraded all prisma packages to 5.14.0 (and explicitly installed the internals package to devDeps),
I ended getting a different error message:

    TypeError: The "to" argument must be of type string. Received an instance of Object
    Code: ERR_INVALID_ARG_TYPE

I kind of suspect pnpm store shenanigans but am honestly not too sure. Anyway it's still a breaking change that'll need to be updated somehow, am just in the middle of wrapping up a work week but might come have a look later if you want assistance?

AhmedElywa commented 3 months ago

Thanks for letting me know about this breaking change.

You should use our last version with prisma 5.14.

The error you face with to argument you have an issue with your version in pnpm I worked with it and working fine.

eunchurn commented 3 months ago

When using version 5.14, pnpm installs @prisma/internal version 5.9. Therefore, in my case, fixing the @prisma/internal version as shown below resolved the error. In version 5.15, the same error occurs in paljs 7.0.0.

{
  "pnpm": {
    "overrides": {
      "@prisma/internals": "5.14.0"
    }
  }
}
AhmedElywa commented 3 months ago

Please use the prisma 5.16 and paljs 7.0.1 and will fix that for you