Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/bin/sh: prisma-class-validator-generator: command not found #19

Open
ionmoraru-toptal opened this issue Sep 11, 2024 · 0 comments
Open

Comments

@ionmoraru-toptal
Copy link

Bug description

I use project node versions using nvm, and pnpm as package manager

I have troubles if i try to generate the schemas while generator is installed locally

I get next error

~/project (main|✚7) (20.16.0) $ nvm use
Now using Node v20.16.0 (npm 10.8.1) ~/.local/share/nvm/v20.16.0/bin/node
~/project (main|✚1) (20.16.0) $ pnpx prisma generate
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Generator "prisma-class-validator-generator" failed:

after installing generator globally it works ~/project (main|✚1) (20.16.0) $ pnpm add -g prisma-class-validator-generator

How to reproduce

  1. node is's installed globally
  2. use nvm to install versions for local project
  3. install prisma and prisma-class-validator-generator
  4. prisma start generation and can't find the generator showing error based on /bin/sh script error

Expected behavior

to generate the schema using local project package

Prisma information

Environment & setup

  • OS: Mac OS
  • Database: PostgreSQL
  • Node.js version: v20.16.0

Prisma Version

pnpx prisma version
Environment variables loaded from .env
prisma                  : 5.19.1
@prisma/client          : 5.19.1
Computed binaryTarget   : darwin-arm64
Operating System        : darwin
Architecture            : arm64
Node.js                 : v20.16.0
Query Engine (Node-API) : libquery-engine 69d742ee20b815d88e17e54db4a2a7a3b30324e3 (at ../../../Library/Caches/pnpm/dlx/b4kwuke4fcm2ppufregi7l7yfi/191e235c2db-140ed/node_modules/.pnpm/@[email protected]/node_modules/@prisma/engines/libquery_engine-darwin-arm64.dylib.node)
Schema Engine           : schema-engine-cli 69d742ee20b815d88e17e54db4a2a7a3b30324e3 (at ../../../Library/Caches/pnpm/dlx/b4kwuke4fcm2ppufregi7l7yfi/191e235c2db-140ed/node_modules/.pnpm/@[email protected]/node_modules/@prisma/engines/schema-engine-darwin-arm64)
Schema Wasm             : @prisma/prisma-schema-wasm 5.19.1-2.69d742ee20b815d88e17e54db4a2a7a3b30324e3
Default Engines Hash    : 69d742ee20b815d88e17e54db4a2a7a3b30324e3
Studio                  : 0.502.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant