Incompatibility with Prisma 5.10.x: import_get_platform.binaryTargets is not iterable
mwillbanks opened this issue · comments
Describe the Bug
import_get_platform.binaryTargets is not iterable
To Reproduce
yarn upgrade --latest @prisma/client prisma
SKIP_PRISMA_VERSION_CHECK=true npx prisma generate
Expected Behavior
- Iterates through appropriately and builds the graphql schema.
Logs
Error: Generator "typegraphql-prisma" failed:
/Volumes/Projects/litmethod-api/node_modules/typegraphql-prisma/node_modules/@prisma/internals/dist/chunk-KZOYY5XX.js:525
var knownBinaryTargets = [...import_get_platform.binaryTargets, "native"];
^
TypeError: import_get_platform.binaryTargets is not iterable
at Object.<anonymous> (/Volumes/Projects/litmethod-api/node_modules/typegraphql-prisma/node_modules/@prisma/internals/dist/chunk-KZOYY5XX.js:525:50)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
at Module.load (node:internal/modules/cjs/loader:1197:32)
at Module._load (node:internal/modules/cjs/loader:1013:12)
at Module.require (node:internal/modules/cjs/loader:1225:19)
at require (node:internal/modules/helpers:177:18)
at Object.<anonymous> (/Volumes/Projects/litmethod-api/node_modules/typegraphql-prisma/node_modules/@prisma/internals/dist/index.js:129:29)
at Module._compile (node:internal/modules/cjs/loader:1356:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
Node.js v18.19.0
error Command failed with exit code 1.
node:child_process:965
throw err;
^
Environment (please complete the following information):
- OS: MacOS 14.2.1 (23C71)
- Node: v18.19.0
typegraphql-prisma
version: 0.27.2- Prisma version 5.10.2
- TypeScript version: 5.3.3
Additional Context
My guess is that this might be coming into play with the latest changes from 5.10 which is allowing more or less for edge locations, there was a bit of internal restructuring. I am going to try to get to this at some point next week but wanted to log it in the event someone else has time before I can get to it.
SKIP_PRISMA_VERSION_CHECK=true
means using untested Prisma version, so this issue could happen.
Feel free to open a PR with the fix, should be pretty easy to fix using the spread operator or deprecated variable.