Unknown build error in project

robbedchunk
PROOP

a month ago

Getting unknown pnpm build error only on Railway when trying to deploy project. Docker build works fine locally

Tried: using Railpack / nixpacks / custom Dockerfile

Solved$20 Bounty

1 Replies

Please share the entire build logs and the source repository if possible.


I can also chat with you here :P


robbedchunk
PROOP

a month ago

hey


This message was from me FYI


robbedchunk
PROOP

a month ago

Oh


robbedchunk
PROOP

a month ago


robbedchunk
PROOP

a month ago

these are the build logs


Can you send your Dockerfile please?


robbedchunk
PROOP

a month ago

FROM node:20.13.1-alpine AS base

WORKDIR /app
COPY package.json pnpm-lock.yaml* ./
RUN corepack enable && corepack prepare pnpm@9.1.1 --activate

FROM base AS deps
RUN apk add --no-cache python3 make g++
RUN pnpm install --frozen-lockfile --ignore-scripts

FROM base AS build
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm prisma generate
RUN pnpm build

FROM base AS runtime
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
COPY --from=build /app/libs ./libs

EXPOSE 3001

CMD ["node", "dist/apps/steam/main"]

Assuming this is closed source?


robbedchunk
PROOP

a month ago

yes unfortunately I can't share the source


Hmmm


Can I see your .gitignore file? Is it possible you've forgotten to commit some files?


Is there a .dockerignore file present?


robbedchunk
PROOP

a month ago

Hey seems I fixed it. Was an issue with Prisma 6.x.x


robbedchunk
PROOP

a month ago

One of our devs updated to 6.x.x "prisma-client" engine but didn't update the imports to use the now-required output folder as the import source for the models


robbedchunk
PROOP

a month ago

For some reason building it locally worked, but it failed on railway not sure why


robbedchunk
PROOP

a month ago

/close


Status changed to Solved noahd about 1 month ago