prisma-dbml-generator
prisma-dbml-generator copied to clipboard
prisma-dbml-generator not fund when using local package call
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?
We solved this by having separate generate calls, move the dbml generate out and use "prisma generate --generator client" in package.json instead.