gperdomor / nx-tools

Nx Workspaces builders and tools
MIT License
358 stars 56 forks source link

nx-prisma: The "path" argument must be of type string. Received undefined #1123

Closed igo closed 1 month ago

igo commented 2 months ago

Just installed nx-prisma and run generate and got: The "path" argument must be of type string. Received undefined

    "prisma-generate": {
      "executor": "@nx-tools/nx-prisma:generate",
      "options": {
        "schema": "apps/myapp/src/lib/db/schema.prisma"
      }
    },
% nx prisma-generate myapp --verbose                                                          

> nx run myapp:prisma-generate

>  Generating Client 

[command]/Users/igo/.nvm/versions/node/v20.12.2/bin/npx prisma generate --schema=apps/myapp/src/lib/db/schema.prisma
RunStart duration: 221
                      Environment variables loaded from .env
Prisma schema loaded from apps/myapp/src/lib/db/schema.prisma
Error: 
The "path" argument must be of type string. Received undefined

 NX   Error: 

The "path" argument must be of type string. Received undefined

Error: Error: 
The "path" argument must be of type string. Received undefined
    at /Users/igo/workspace/myapp/myapp/node_modules/@nx-tools/nx-prisma/src/run-commands.js:21:23
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/igo/workspace/myapp/myapp/node_modules/@nx-tools/nx-prisma/src/run-commands.js:17:9

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Running target prisma-generate for project myapp failed

Failed tasks:

- myapp:prisma-generate
igo commented 2 months ago

Seems that upgrading prisma version fix this

gperdomor commented 1 month ago

@igo Thank you buddy...