valentinpalkovic/prisma-json-schema-generator

ENOENT on Prisma starter example

Opened this issue · 5 comments

my schema:

datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}

generator client {
provider = "prisma-json-schema-generator"
}

model Step {
id Int @id @default(autoincrement())
title String
category String
inputs InputModel[]
outputs OutputModel[]
modelIds Int?
}

model OutputModel {
id Int @id @default(autoincrement())
name String @unique
ns String
}

model InputModel {
id Int @id @default(autoincrement())
name String @unique
ns String
}

prisma generate
Environment variables loaded from prisma.env
Prisma schema loaded from prisma\schema.prisma
Error: spawn prisma-json-schema-generator ENOENT

node -v
v12.18.0

prisma -v
@prisma/cli : 2.14.0
@prisma/client : 2.14.0
Current platform : windows

Let me know if you need any more information to reproduce the bug, this library looks really useful!

Can you post your folder structure and can you tell me from which folder you are executing the prisma generate command? I think something goes wrong during folder/file creation.

And can you eventually tell me, whether a folder named json-schema was created somewhere?

I tried to reproduce the issue but without success :/.

I think I have used the same environment as you did:

  • Windows 10
  • @prisma/cli: 2.14.0
  • @prisma/client: 2.14.0
  • Node: v12.18.0

And I also used the same schema as you did. Can you create a reproducible example?

Valentin, Thanks for looking into this! I'll do my best to provide a full repo example

Greetings I think I found out what happened: I used the provided Quickstart instructions from prisma to download files from prisma to get started. The security on my computer didn't trust the files downloaded VIA curl and the node_modules had some permissions errors, closing this for now.