R
Railwayβ€’10mo 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β€’10mo ago
Project ID: b7971003-5caf-446a-adb5-6a88dcd7e375
Mustafa
MustafaOPβ€’10mo ago
Project ID b7971003-5caf-446a-adb5-6a88dcd7e375
Brody
Brodyβ€’10mo ago
please make sure file paths and filenames have the correct casing
Mustafa
MustafaOPβ€’10mo 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β€’10mo 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
MustafaOPβ€’10mo 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β€’10mo ago
case sensitivity
Mustafa
MustafaOPβ€’10mo ago
explain please
Brody
Brodyβ€’10mo ago
explanation is here πŸ™‚
Mustafa
MustafaOPβ€’10mo ago
Still can't get that. could you give me an example please !
Brody
Brodyβ€’10mo 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
MustafaOPβ€’10mo ago
meaning that may i use import "src/repo" and dir is src/Repo ?
Brody
Brodyβ€’10mo ago
yeah, those kinds of differences matter
Mustafa
MustafaOPβ€’10mo ago
this should matters locally as well incase exist, right ?
Brody
Brodyβ€’10mo ago
well I've heard windows isn't case sensitive
Mustafa
MustafaOPβ€’10mo 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β€’10mo ago
please still quadruple check
Want results from more Discord servers?
Add your server