Errors

Prisma client is missing CheckoutCoupon — recreate the web container, not only restart

admin-checkout-coupons — prisma.checkoutCoupon delegate missing.

Prisma client is missing CheckoutCoupon — recreate the web container, not only restart

Admin coupon helpers threw because prisma.checkoutCoupon is missing on the running client. Product: run npm run db:generate, then recreate the web container (docker compose up -d web), not only restart.

Why this happens

Schema includes CheckoutCoupon but the container still runs an old generated client. A plain restart often keeps the old image/client; recreate picks up generate output.

Diagnose and fix

1. Run npm run db:generate (or your image build step that runs Prisma generate).

2. Recreate web: docker compose up -d web (or equivalent), not restart alone.

3. Confirm migrations applied if the table itself is missing.

4. Reload admin coupons; member apply should work once the delegate exists.

Related