You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using husky to execute pre-commit script. I have there something like:
...
./node_modules/.bin/prisma generate <-- problem
git add 'prisma/dbml/schema.dbml'
it is not working returning error:
Error: Generator at prisma-dbml-generator could not start:
/bin/sh: 1: prisma-dbml-generator: not found
Everything works fine using prisma generate from local project terminal or npx/yarn prisma generate in husky script but not with explicit package call. I suspect there is some problem with PATH and my intention here is to let the husky script be package manager agnostic by using preinstalled binaries whether it is yarn or npm etc.
Could you direct me on how to make it work or maybe is there something you could do to make prisma binary be aware of your generator so it can call it directly?
The text was updated successfully, but these errors were encountered:
by default run npm run prisma:generate will generate the client only, in my case I run inside the docker. And run npm run prisma:generate:all to generate all generator (include dbml)
I am using husky to execute pre-commit script. I have there something like:
it is not working returning error:
Everything works fine using
prisma generate
from local project terminal ornpx/yarn prisma generate
in husky script but not with explicit package call. I suspect there is some problem with PATH and my intention here is to let the husky script be package manager agnostic by using preinstalled binaries whether it is yarn or npm etc.Could you direct me on how to make it work or maybe is there something you could do to make prisma binary be aware of your generator so it can call it directly?
The text was updated successfully, but these errors were encountered: