fix build errors on passenger api

This commit is contained in:
SennayT
2026-05-14 15:01:36 +03:00
parent ae950edae0
commit 839bde137f
2 changed files with 7 additions and 4 deletions

View File

@@ -30,10 +30,8 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store\
pnpm install --frozen-lockfile
FROM deps AS build
COPY . .
# ENV CI=true
RUN pnpm run build
RUN find . -name "main.js"
FROM base AS freight-api
# RUN corepack enable && corepack prepare pnpm@9.12.0 --activate
@@ -55,8 +53,11 @@ FROM base AS passenger-api
WORKDIR /app/apps/edr-passenger-api
ENV NODE_ENV=production
COPY --from=deps /app/node_modules ./../../node_modules
COPY --from=deps /app/apps/edr-passenger-api/node_modules ./node_modules
# Use build-stage node_modules (not deps): `pnpm run build` runs `prisma generate`, which
# writes the real @prisma/client (enums, types). deps never runs generate, so @IsEnum(ServiceClass)
# and similar would see undefined at runtime if we copied deps only.
COPY --from=build /app/node_modules ./../../node_modules
COPY --from=build /app/apps/edr-passenger-api/node_modules ./node_modules
COPY --from=build /app/apps/edr-passenger-api/dist ./dist
COPY --from=build /app/apps/edr-passenger-api/package.json ./package.json
COPY --from=build /app/packages ./../../packages

View File

@@ -1,7 +1,9 @@
{
"$schema": "https://json.schemastore.org/nest-cli",
"collection": "@nestjs/schematics",
"sourceRoot": "src",
"compilerOptions": {
"deleteOutDir": true,
"plugins": ["@nestjs/swagger"],
"tsConfigPath": "tsconfig.build.json",
"watchAssets": true