prisma-json-schema-generator icon indicating copy to clipboard operation
prisma-json-schema-generator copied to clipboard

Getting /bin/sh: 1: prisma-json-schema-generator: not found

Open ShrutikaNikola opened this issue 2 years ago • 5 comments

Even though i have done npm insatlled npm i prisma-json-schema-generator I am getting this error /bin/sh: 1: prisma-json-schema-generator: not found

My prisma.schema looks like this `datasource db { provider = "postgresql" url = env("DATABASE_URL") }

generator client { provider = "prisma-client-js" }

generator jsonSchema { provider = "prisma-json-schema-generator" keepRelationScalarFields = "true" schemaId = "some-schema-id" includeRequiredFields = "true" persistOriginalType = "true" }

model adr { sequence_id Int @id case_id
}`

ShrutikaNikola avatar Oct 17 '22 05:10 ShrutikaNikola

I'm having the same issue.

DanielRSnell avatar Dec 03 '22 19:12 DanielRSnell

Did you find some solution please?

benistary avatar Aug 15 '23 10:08 benistary

You can fix this by prepending yarn

generator jsonSchema {
    provider = "yarn prisma-json-schema-generator"
}

Brmm avatar Oct 21 '23 08:10 Brmm

Also works for npm:

generator jsonSchema {
    provider = "npx prisma-json-schema-generator"
}

hongkongkiwi avatar Apr 12 '24 16:04 hongkongkiwi

This happens when I update it to 5.1.3:

image

wizardAEI avatar Apr 19 '24 08:04 wizardAEI