R
Railway•4mo ago
Mustafa

Specific docker file works as expected locally, but in railway it fails (Turbo Monorepo PNPM )

Environments Turbo Repo (PNPM Workspace) Specific docker file works as expected locally, but in railway it fails. I've added the variable path to variables RAILWAY_DOCKERFILE_PATH=Dockerfile.MAIN testing this locally works as expected using this command docker build -t mainapi --progress=plain . -f Dockerfile.MAIN But in build logs. i got unexpected error like missing paths ERROR in ../../packages/auth/src/lib/user/user.service.ts 12:15-37
17 Replies
Percy
Percy•4mo ago
Project ID: b7971003-5caf-446a-adb5-6a88dcd7e375
Mustafa
Mustafa•4mo ago
Project ID b7971003-5caf-446a-adb5-6a88dcd7e375
Brody
Brody•4mo ago
please make sure file paths and filenames have the correct casing
Mustafa
Mustafa•4mo ago
It's the same and detect it successfully #2 [internal] load build definition from Dockerfile.MAIN #13 8.992 main-api:build: Module not found: Error: Can't resolve '@repo/utils' in '/app/packages/auth/src/lib/**' This is the json config file
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"dockerfilePath": "./Dockerfile.MAIN"
},
"deploy": {
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "DOCKERFILE",
"dockerfilePath": "./Dockerfile.MAIN"
},
"deploy": {
"numReplicas": 1,
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
Brody
Brody•4mo ago
i've seen this error lots, and every time ive seen it the user had their project folders and files cased incorrectly, i dont think this has anything to do with your dockerfile please be sure all your project folders and files are cased the same locally, as they are on github
Mustafa
Mustafa•4mo ago
Iam sure they're the same any hints how to fix this ? the question is: what makes docker file behave different in railway build ?
Brody
Brody•4mo ago
case sensitivity
Mustafa
Mustafa•4mo ago
explain please
Brody
Brody•4mo ago
explanation is here 🙂
Mustafa
Mustafa•4mo ago
Still can't get that. could you give me an example please !
Brody
Brody•4mo ago
please be sure all your project folders and files are cased the same locally, as they are on github https://en.wikipedia.org/wiki/Case_sensitivity
Mustafa
Mustafa•4mo ago
meaning that may i use import "src/repo" and dir is src/Repo ?
Brody
Brody•4mo ago
yeah, those kinds of differences matter
Mustafa
Mustafa•4mo ago
this should matters locally as well incase exist, right ?
Brody
Brody•4mo ago
well I've heard windows isn't case sensitive
Mustafa
Mustafa•4mo ago
my machine is Mac, and railway build is linux so, if case sensitve is not the case. what else may cause this issue ?
Brody
Brody•4mo ago
please still quadruple check