56 Replies

cc @Kosai106 👋


kosai106
HOBBY

2 years ago

the build suddenly fails
To be fair, the build never worked lol



kosai106
HOBBY

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


Anyway flagged to the team, I do have to dip for a call but we are looking into it.


(Unless you have time in an hour when I can go deep into this.)


kosai106
HOBBY

2 years ago

I'll be around, thanks for the help so far!


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.


kosai106
HOBBY

2 years ago

Oh! That's good-ish news


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 found

kosai106
HOBBY

2 years ago

Ah, ,we're back to that error again. That's nice haha


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.


kosai106
HOBBY

2 years ago

Okay, do what you must <:salute:1137099685417451530>


kosai106
HOBBY

2 years ago

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


kosai106
HOBBY

2 years ago

Ahhh, okay that's why. I use yarn myself. Good to know!


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


kosai106
HOBBY

2 years ago

🤦‍♂️ 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


kosai106
HOBBY

2 years ago

Yeah trying that now


kosai106
HOBBY

2 years ago

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?


kosai106
HOBBY

2 years ago

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


kosai106
HOBBY

2 years ago

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?


kosai106
HOBBY

2 years ago

1250947221801668600


2 years ago

are you using node 18 to run this app locally?


kosai106
HOBBY

2 years ago

Yes, I'm using Node 18.18.2 as specified in my .nvmrc


kosai106
HOBBY

2 years ago

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


kosai106
HOBBY

2 years ago

Geez, the built image is 4.25GB


2 years ago

nixpacks is not known for small images


kosai106
HOBBY

2 years ago

Haha good to know. Honestly I'm just happy to see this step at last


kosai106
HOBBY

2 years ago

<:lfg:786867302888505364>

1250960095697703000


2 years ago

but does it work


kosai106
HOBBY

2 years ago

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?


kosai106
HOBBY

2 years ago

Yes


kosai106
HOBBY

2 years ago

It's complaining about the SESSION_SECRET_KEY var

1250961042700238800


kosai106
HOBBY

2 years ago

@nextbanana/web:start: Error: You must provide the SESSION_SECRET_KEY environment variable in production.


2 years ago

is this a next app?


kosai106
HOBBY

2 years ago

It's a Blitz.js app (Blitz is a layer on top of Next) https://blitzjs.com/


kosai106
HOBBY

2 years ago

The build logs don't indicate an issue


2 years ago

its 32 characters right?


kosai106
HOBBY

2 years ago

Yes, I just double checked


kosai106
HOBBY

2 years ago

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!


We need a way to surface these common issues better- anyway, appreciate you bearing with us


kosai106
HOBBY

2 years ago

@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


Loading...