Skip to content

npx prisma generate hangs after installing prisma-factory #16

@willian

Description

@willian

After installing prisma-factory I can't run npx prisma generate anymore. It just hangs.

I added DEBUG=* to it and got the following output:

  prisma:engines binaries to download libquery-engine, migration-engine, introspection-engine, prisma-fmt +0ms
  prisma:loadEnv  project root found at /Users/{path-omitted}/package.json +0ms
  prisma:tryLoadEnv  Environment variables loaded from /Users/{path-omitted}/.env +0ms
  prisma:getConfig  Using CLI Query Engine (Node-API Library) at: /Users/{path-omitted}/node_modules/prisma/libquery_engine-darwin.dylib.node +0ms
  prisma:getConfig  Loaded Node-API Library +8ms
  prisma:getConfig  config data retrieved without errors in getConfigNodeAPI +5ms
  prisma:getDMMF  Using CLI Query Engine (Node-API Library) at: /Users/{path-omitted}/node_modules/prisma/libquery_engine-darwin.dylib.node +0ms
  prisma:getDMMF  Loaded Node-API Library +0ms
  prisma:getDMMF  unserialized dmmf result ready +87ms
  prisma:getDMMF  dmmf retrieved without errors in getDmmfNodeAPI +36ms
  prisma:generator  prismaCLIDir /Users/{path-omitted}/node_modules/prisma +0ms
  prisma:generator  prismaClientDir /Users/{path-omitted}/node_modules/@prisma/client +0ms
  prisma:generator  baseDir /Users/{path-omitted}/prisma +0ms
  prisma:generator  typescriptPath /Users/{path-omitted}/node_modules/typescript +2ms
  prisma:GeneratorProcess  2022-06-16T18:45:39.441Z prisma:client:generator  requiredEngine: libqueryEngine +0ms
  prisma:GeneratorProcess  node:internal/modules/cjs/loader:942 +53ms
  prisma:GeneratorProcess    throw err; +0ms
  prisma:GeneratorProcess    ^ +0ms
  prisma:GeneratorProcess  Error: Cannot find module './lib/stringify' +0ms
  prisma:GeneratorProcess  Require stack: +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/braces/index.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/micromatch/index.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/fast-glob/out/utils/pattern.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/fast-glob/out/utils/index.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/fast-glob/out/managers/tasks.js +1ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/fast-glob/out/index.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/@ts-morph/common/dist/ts-morph-common.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/ts-morph/dist/ts-morph.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/prisma-factory/dist/generator.js +0ms
  prisma:GeneratorProcess  - /Users/{path-omitted}/node_modules/prisma-factory/bin/generator.js +0ms
  prisma:GeneratorProcess      at Module._resolveFilename (node:internal/modules/cjs/loader:939:15) +0ms
  prisma:GeneratorProcess      at Module._load (node:internal/modules/cjs/loader:780:27) +0ms
  prisma:GeneratorProcess      at Module.require (node:internal/modules/cjs/loader:1005:19) +0ms
  prisma:GeneratorProcess      at require (node:internal/modules/cjs/helpers:102:18) +0ms
  prisma:GeneratorProcess      at Object.<anonymous> (/Users/{path-omitted}/node_modules/braces/index.js:3:19) +0ms
  prisma:GeneratorProcess      at Module._compile (node:internal/modules/cjs/loader:1105:14) +0ms
  prisma:GeneratorProcess      at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) +0ms
  prisma:GeneratorProcess      at Module.load (node:internal/modules/cjs/loader:981:32) +0ms
  prisma:GeneratorProcess      at Module._load (node:internal/modules/cjs/loader:827:12) +0ms
  prisma:GeneratorProcess      at Module.require (node:internal/modules/cjs/loader:1005:19) { +0ms
  prisma:GeneratorProcess    code: 'MODULE_NOT_FOUND', +0ms
  prisma:GeneratorProcess    requireStack: [ +1ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/braces/index.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/micromatch/index.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/fast-glob/out/utils/pattern.js', +5ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/fast-glob/out/utils/index.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/fast-glob/out/managers/tasks.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/fast-glob/out/index.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/@ts-morph/common/dist/ts-morph-common.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/ts-morph/dist/ts-morph.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/prisma-factory/dist/generator.js', +0ms
  prisma:GeneratorProcess      '/Users/{path-omitted}/node_modules/prisma-factory/bin/generator.js' +0ms
  prisma:GeneratorProcess    ] +0ms
  prisma:GeneratorProcess  } +0ms
  prisma:GeneratorProcess  Node.js v18.0.0 +0ms

Honestly, I don't know what's missing to make it work. It seems to be missing a dependency, but I can't tell how to fix it.
Can someone help me with that?

I really appreciate any help you can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions