[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Prisma 5.10.x: import_get_platform.binaryTargets is not iterable #442

Open
mwillbanks opened this issue Mar 1, 2024 · 1 comment
Labels
community Something initiated by the community enhancement New feature or request

Comments

@mwillbanks
Copy link

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.

@MichalLytek MichalLytek added enhancement New feature or request community Something initiated by the community labels Mar 2, 2024
@MichalLytek
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Something initiated by the community enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants