zenstack icon indicating copy to clipboard operation
zenstack copied to clipboard

generate command not working for multirepo project

Open iolathief108 opened this issue 1 year ago • 2 comments

Description and expected behavior This is a multirepo project which have server and web inside the root directory.

server/package.json

 "scripts": {
    "with-env": "dotenv -e ../.env --",
    "db:gen": "yarn with-env prisma generate --schema=./lib/prisma/prisma/schema.prisma",
    "db:push": "yarn with-env prisma db push --schema=./lib/prisma/prisma/schema.prisma",
    "zen:gen": "yarn zenstack generate --schema=./lib/prisma/schema.zmodel",
  },

Screenshots 2024-06-12_185825 2024-06-12_185840

Running the same command at the root directory is working.

Environment (please complete the following information):

  • ZenStack version: [e.g., 2.0.0]
  • Prisma version: [e.g., 5.7.0]
  • Database type: [e.g. Postgresql]

Additional context Add any other context about the problem here.

iolathief108 avatar Jun 12 '24 13:06 iolathief108

Hi @iolathief108 , thanks for reporting this. Does it work if you run "yarn db:gen" inside the "server" directory?

ymc9 avatar Jun 16 '24 14:06 ymc9

Hi @iolathief108 , thanks for reporting this. Does it work if you run "yarn db:gen" inside the "server" directory?

yes

iolathief108 avatar Jun 21 '24 05:06 iolathief108