question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Stuck at generation step

See original GitHub issue

Hello,

I just installed this generator to try it out, but so far nothing is working.

I attempted to run it on two separate projects, one has a small prisma and the other has a relatively large one.

Both didn’t work, and remained stuck.

I can’t share the schemas unfortunately. So, any ideas what could the problem be?

I also enabled strict in tsconfig, still the same.

prisma                  : 3.6.0
@prisma/client          : 3.6.0
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine    : introspection-core dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary           : prisma-fmt dc520b92b1ebb2d28dc3161f9f82e875bd35d727 (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash    : dc520b92b1ebb2d28dc3161f9f82e875bd35d727
Studio                  : 0.440.0
typescript": "^4.5.2"
"zod-prisma": "^0.5.4"
{
  "compilerOptions": {
    "target": "es2018",
    "module": "commonjs",
    "lib": ["es2018", "esnext.asynciterable"],
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "declaration": true,
    "removeComments": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "sourceMap": false,
    "outDir": "./dist",
    "baseUrl": "./",
    "incremental": true,
    "skipLibCheck": true,
    "strictNullChecks": false,
    "noImplicitAny": false,
    "strictBindCallApply": false,
    "forceConsistentCasingInFileNames": false,
    "noFallthroughCasesInSwitch": false,
    "strict": true
  }
}

I also cloned the example in this repo, but it had no zod-prisma configured at all. So, I added this from README:

generator zod {
  provider = "zod-prisma"
  output   = "./zod"

  relationModel = true
  // relationModel         = "default" // Do not export model without relations.
  // relationModel         = false // Do not generate related model

  modelCase = "PascalCase"
  // modelCase             = "camelCase" // Output models using camel case (ex. userModel, postModel)

  modelSuffix = "Model"

  // useDecimalJs          = false // (default) represent the prisma Decimal type using as a JS number
  useDecimalJs = true

  imports = null

  // https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values
  prismaJsonNullability = true
  // prismaJsonNullability = false // allows null assignment to optional JSON fields
}

but it also got stuck when I ran npx prisma generate

I use node v14.19.1

I upgraded to latest prisma version:

prisma                  : 3.13.0
@prisma/client          : 3.13.0
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine    : introspection-core efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary           : prisma-fmt efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash    : efdf9b1183dddfd4258cd181a72125755215ab7b
Studio                  : 0.459.0

Still same issue!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
CarterGrimmeisencommented, May 5, 2022

Sounds good to me! Thanks for the feedback

1reaction
omar-dulaimicommented, May 5, 2022

I think the generator should output a warning when it can’t find the zod dependency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

zod-prisma keeps getting stuck at the generation step
I attempted to run it on two separate projects, one has a small prisma and the other has a relatively large one. Both...
Read more >
The Stuck-at-Home Generation - Greater Good Science Center
As a child and young adult, I was given lots of opportunities to develop independence. I went to a boarding school at age...
Read more >
Generation Stuck | Home - WBUR
In WBUR's Generation Stuck, explore the lives of those affected and share your own story. ... I consider that to be a step...
Read more >
New mesh generation stuck on "Initializing histogram" step
Hello, Working on a small project, the new mesh generation method has failed two times, stuck on an "Initializing histogram" step.
Read more >
How To Solve “Processing 10%” Feed Generation Stuck Error
In this video you will learn how to solve the “processing 10%” feed generation stuck error.CTX Feed - WooCommerce Product Feed Manager ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found