title: Build Nest.js in docker got a Prisma erorr
body: <p>I am building an application in nest.js ,then I want to dockerize it by using docker, this is my docker file:</p>
  <pre class="lang-sh prettyprint-override"><code>FROM node:14 AS builder
  
  # Create app directory
  WORKDIR /app
  
  # A wildcard is used to ensure both package.json AND package-lock.json are copied
  COPY package*.json ./
  COPY prisma ./prisma/
  
  # Install app dependencies
  RUN npm install
  
  COPY . .
  
  RUN npm run build
  
  FROM node:14
  
  COPY --from=builder /app/node_modules ./node_modules
  COPY --from=builder /app/package*.json ./
  COPY --from=builder /app/dist ./dist
  
  EXPOSE 3000
  CMD [ &quot;npm&quot;, &quot;run&quot;, &quot;start:prod&quot; ]
  </code></pre>
  <p>Then when I run :</p>
  <pre class="lang-sh prettyprint-override"><code>docker build -t medicine-api .
  </code></pre>
  <p>I got this erorr from prisma</p>
  <pre class="lang-sh prettyprint-override"><code>Module '&quot;@prisma/client&quot;' has no exported member 'User'.
  
  3 import { User } from '@prisma/client';
  </code></pre>
  <p>and this is my prisma.schema file</p>
  <pre class="lang-sh prettyprint-override"><code>/ This is your Prisma schema file,
  // learn more about it in the docs: https://pris.ly/d/prisma-schema
  
  generator client {
    provider = &quot;prisma-client-js&quot;
  }
  
  generator prismaClassGenerator {
    provider = &quot;prisma-class-generator&quot;
    dryRun   = false
  }
  
  datasource db {
    provider = &quot;postgresql&quot;
    url      = env(&quot;DATABASE_URL&quot;)
  }
  
  model User {
    id               Int                @id @default(autoincrement())
    phoneNumber      String             @unique
    lastName         String
    firstName        String
    role             Role
    bio              String?
    certificate      String?
    pic              String?
    verified         Boolean            @default(false)
    medicine         Medicine[]
    pharmacyMedicine PharmacyMedicine[]
    medicineCategory MedicineCategory[]
    pharmacyPackage  PharmacyPackage[]
    pharmacistOrder  Order[]            @relation(&quot;pharmacistOrder&quot;)
    userOrder        Order[]            @relation(&quot;userOrder&quot;)
  }
  </code></pre>
  <p>I try to fix this by searching through difference resource and website, then they recommend me to put <code>npx prisma generate</code> in my dockefil. But still I get another erorr here:</p>
  <pre class="lang-sh prettyprint-override"><code>Error: Generator at prisma-class-generator could not start:
  
  /bin/sh: 1: prisma-class-generator: not found
  
  </code></pre>
  <p>If you have any solutions , I am really happy to try. Thanks in advance.</p>