a year ago
Not quite sure how to fix this, it can't seem to find the prisma client?
0 Replies
I tried copying over my Dockerfile from my other bun/prisma project but that failed too
FROM oven/bun:1 as base
WORKDIR /usr/src/app
RUN apt update \
&& apt install -y curl
# Install nodejs using n
ARG NODE_VERSION=18
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
&& bash n $NODE_VERSION \
&& rm n \
&& npm install -g n
COPY . .
ARG DATABASE_URL
ARG DIRECT_URL
RUN cd ./apps/ws_server && bun install --frozen-lockfile && cd /usr/src/app
ENV NODE_ENV=production
# RUN bunx prisma generate
RUN bunx turbo run build --filter=ws_server
CMD bunx turbo run start --filter=ws_server
but I have turbo in my package.json? so I'm confused on why it's failing
a year ago
build logs please
a year ago
you can send files in discord too 😆
a year ago
may i quicky as why no bookmarklet?
a year ago
i havent heard of anyone using bookmarklets on arc
a year ago
do you have a root directory set?
a year ago
just asking to gather info, not an actionable question, but the root directory setting is in the source section of the service settings
a year ago
can you send the package.json in your root?
{
"name": "discord-dnd",
"private": true,
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"start": "turbo start",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"devDependencies": {
"@repo/eslint-config": "*",
"@repo/typescript-config": "*",
"discord-api-types": "^0.37.76",
"prettier": "^3.2.5",
"turbo": "latest"
},
"engines": {
"node": ">=18"
},
"packageManager": "bun@1.0.30",
"workspaces": [
"apps/*",
"packages/*"
]
}
a year ago
unless im blind, no priama there, so its not going to be installed
{
"name": "server",
"module": "index.ts",
"type": "module",
"scripts": {
"dev": "bun index.ts",
"start": "bun index.ts",
"db:generate": "prisma generate",
"db:push": "prisma db push --skip-generate"
},
"devDependencies": {
"@types/bun": "latest",
"prisma": "5.11.0"
},
"peerDependencies": {
"typescript": "^5.0.0",
"@repo/typescript-config": "*"
},
"dependencies": {
"@prisma/client": "5.11.0"
}
}
a year ago
exactly, so you will need an install command that installs the deps from the server app
a year ago
im sure that can be one of the issues, but its not the issue
a year ago
doesnt seem like it is on railway, besides even if it did, would you want to install deps from the client?
a year ago
could this be a case of railway running an old bun version?
a year ago
and mine is non existent
a year ago
Dockerfile is always an option, would get you the latest bun version on every deploy thats for sure
FROM oven/bun:1 as base
WORKDIR /usr/src/app
RUN apt update \
&& apt install -y curl
# Install nodejs using n
ARG NODE_VERSION=18
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
&& bash n $NODE_VERSION \
&& rm n \
&& npm install -g n
COPY . .
ARG DATABASE_URL
RUN cd ./apps/server && bun install --frozen-lockfile && cd /usr/src/app
ENV NODE_ENV=production
# RUN bunx prisma generate
RUN bunx turbo run build --filter=server
CMD bunx turbo run start --filter=server
a year ago
how do you know the dockerfile is being used?
a year ago
i mean yeah but you still gotta make sure
a year ago
where is that dockerfile located?
a year ago
you have turbo listed as a dev dep, maybe thats why?
a year ago
you dont have turbo in the server package.json
a year ago
but you are trying to use it
it should only be needed in the root level package.json from my understanding
a year ago
you are cd'ing into the server directory though
FROM oven/bun:1 as base
WORKDIR /usr/src/app
RUN apt update \
&& apt install -y curl
ARG NODE_VERSION=18
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
&& bash n $NODE_VERSION \
&& rm n \
&& npm install -g n
COPY . .
ARG DATABASE_URL
RUN bun install --frozen-lockfile && cd /usr/src/app
ENV NODE_ENV=production
CMD bunx turbo run start --filter=server
a year ago
theres still cd there, please remove
a year ago
cd /usr/src/app
a year ago
no, its set by WORKDIR /usr/src/app
a year ago
try moving turbo out of dev deps
a year ago
hmmm im running out of ideas
i had a custom start command overriding the one i had in my dockerfile
a year ago
conductors getting metadata about the users service can't come soon enough
a year ago
happy to help where i can