Skip to content

fix(prisma): Isolate all 8 app Prisma clients to prevent monorepo build collisions - #10

Open
hungpixi wants to merge 5 commits into
nclamvn:mainfrom
hungpixi:gstack-ai-fix-1775114892.47925
Open

fix(prisma): Isolate all 8 app Prisma clients to prevent monorepo build collisions#10
hungpixi wants to merge 5 commits into
nclamvn:mainfrom
hungpixi:gstack-ai-fix-1775114892.47925

Conversation

@hungpixi

@hungpixi hungpixi commented Apr 2, 2026

Copy link
Copy Markdown

Problem

All 8 apps with Prisma schemas were generating clients to the same default path, causing TS2339 errors during turbo build.

Solution

Each app now generates to a unique isolated path:

  • Accounting -> .prisma/accounting-client
  • CRM -> .prisma/crm-client
  • HRM -> .prisma/hrm-client
  • HRM-AI -> .prisma/hrm-ai-client
  • HRM-unified -> .prisma/hrm-unified-client
  • MRP -> .prisma/mrp-client
  • TPM-api -> .prisma/tpm-client
  • TPM-api-nestjs -> .prisma/tpm-nestjs-client

481 files changed. Follows existing Ecommerce pattern.

hungpixi added 5 commits April 2, 2026 07:14
…lisions

Each app now generates its Prisma client to a unique output path:
- Accounting -> .prisma/accounting-client
- CRM -> .prisma/crm-client
- HRM -> .prisma/hrm-client
- HRM-AI -> .prisma/hrm-ai-client
- HRM-unified -> .prisma/hrm-unified-client
- MRP -> .prisma/mrp-client
- TPM-api -> .prisma/tpm-client
- TPM-api-nestjs -> .prisma/tpm-nestjs-client

All source file imports updated from '@prisma/client' to the app-specific path.
This prevents the TS2339 'Property does not exist' errors caused by
the last-built app overwriting the shared default Prisma client output.
@vnaisoft-huy

Copy link
Copy Markdown

này mình tách ra để không dùng chung packages, để deploy riêng đúng không bạn

@duongmh

duongmh commented Apr 2, 2026

Copy link
Copy Markdown

Mình run riêng từng app thì run được nhưng lại lỗi 404

@vnaisoft-huy

Copy link
Copy Markdown

Mình run riêng từng app thì run được nhưng lại lỗi 404

lỗi đó do có 2 mục app, bạn đổi tên 1 mục là được

@duongmh

duongmh commented Apr 2, 2026

Copy link
Copy Markdown

Mình run riêng từng app thì run được nhưng lại lỗi 404

lỗi đó do có 2 mục app, bạn đổi tên 1 mục là được

Oh, mình đọc được bài giới thiệu là đã triển khai thực tế nên mới vô đây để tải về chạy xem thế nào mà chật vật quá mới run được.

@jasonngodev

Copy link
Copy Markdown

Có ai lỗi giống mình không

D:\Viet-ERP>npm run dev

erp-ecosystem@1.0.0 dev
turbo run dev

• turbo 2.8.21
x Invalid task configuration
-> x You have 27 persistent tasks but turbo` is configured for concurrency of 10. Set --concurrency to at least 28

@duongmh

duongmh commented Apr 21, 2026

Copy link
Copy Markdown

Mono nặng quá nên không chạy cùng lúc 27 apps ở trên máy cấu hình không đủ được. Cấu hình là 10 thôi. Nhưng khuyên bạn bỏ qua repo này đi. Không học hỏi được gì đâu.

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

Successfully merging this pull request may close these issues.

4 participants