2 years ago
For customer NextBanana, the build suddenly fails: https://railway.app/project/a0dd0432-b630-4b33-9235-b63593fd7389/service/f5d52ff3-914f-4b41-b5af-281306fd040b/settings
56 Replies
2 years ago
cc @Kosai106 👋
2 years ago
;-;
Happy to provide any information needed to help debug this 😬 Would love to try out your service to get this project deployed
2 years ago
Anyway flagged to the team, I do have to dip for a call but we are looking into it.
2 years ago
(Unless you have time in an hour when I can go deep into this.)
2 years ago
Hey there @Kosai106 - so good-ish news, it's not a total platform issue, the bad news is that it may still be our fault here since we aren't properly detecting Turbo repo.
2 years ago
The errors that I am seeing now are much more dephicerable, its says:
WARN config production Use `--omit=dev` instead.
#13 0.566
#13 0.566 > build
#13 0.566 > turbo run build
#13 0.566
#13 0.570 sh: 1: turbo: not found2 years ago
I switched your workloads back over to the legacy system just so we can grok whats going on, I do suspect that you were running into platform related messes by way of what our build engineer was mentioning to us- however, Turbo availability is a tale as the end of time.
I just noticed that the build is installing dependencies with yarn install --frozen-lockfile but I'm running the scripts with npm run xxx which could explain why the error I'm now getting the error turbo: not found
But I'm not sure where the yarn command is defined 🤔 Only instances I'm seeing in the code is my GitHub actions but I'm not sure those are being used here
2 years ago
nixpacks will use yarn if it fines a yarn lock file, this would take priority over a package lock file
2 years ago
but as for turbo not being found, is it in your deps / dev deps? maybe you have it only installed locally globally
🤦♂️ I do have it installed, but it's as a dev dependency… That would explain it
2 years ago
afaik dev deps should be installed
2 years ago
but swap it over just to be sure
Yeah that worked lol, I mean the build is still failing but it did find turbo now
2 years ago
progress!
2 years ago
whats the new error?
It's failing to build one of the websites and not the one I'm specifing the build for using --filter='@nextbanana/web' it's trying to also build @nextbanana/landing for some reason
2 years ago
how are you telling railway what build command to run?
2 years ago
by default nixpacks is going to run the build script
2 years ago
maybe also try specifying NIXPACKS_TURBO_APP_NAME
I specified the command in my railway.json
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"buildCommand": "npm run build --filter='@nextbanana/web'"
},
"deploy": {
"numReplicas": 1,
"startCommand": "npm run start --filter='@nextbanana/web'",
"sleepApplication": false,
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}2 years ago
does the nixpacks build table state that it will be running those commands?
2 years ago
are you using node 18 to run this app locally?
Okay, instead of specifying the filter in the railway.json, I added separate npm scripts in my root package.json and used those commands instead. This seems to work, though I'm not sure why there would be a difference.
2 years ago
that is very odd indeed, im not sure why either
2 years ago
nixpacks is not known for small images
2 years ago
but does it work
Yes and no. The app launches, though it isn't picking up one of the environment variables so I get an error immediately lol
2 years ago
you have it set as a service variable?
@nextbanana/web:start: Error: You must provide the SESSION_SECRET_KEY environment variable in production.
2 years ago
is this a next app?
It's a Blitz.js app (Blitz is a layer on top of Next) https://blitzjs.com/
2 years ago
its 32 characters right?
Anyway, it's 2am here now, we already got over the main issue which is great! I'll figure out the rest sometime tomorrow after work.
Thank you so much for your time @Brody as well as you @angelo ! Appreciate all the effort 🙏
2 years ago
happy to help!
2 years ago
We need a way to surface these common issues better- anyway, appreciate you bearing with us
@Brody I had to add the SESSION_SECRET_KEY as an env string in my turbo config. App is deployed and working now
And now I'll finally be able to sleep
2 years ago
ah I knew it was something like that, seen another user have to do something similar, but wasn't confident enough with the reason so I didn't say anything
2 years ago
but glad you got it working, when you have some down time to test stuff you can drop nixpacks and write a Dockerfile so you aren't ending up having to wait for a 2.25GB image to get pushed and pulled on every deployment


