64 Replies
Project ID:
N/A
give this thread a read https://discord.com/channels/713503345364697088/1171478849352118282/1171480729083977729
+
following up here, did that help?
Thank you, I'm actually a bum and got side tracked
About to try again now
This is not specific to Railway but I'm running into an issue where my build command is failing even though in my tsconfig I'm telling it to ignore the files that it is failing to build
im sorry i dont know typescript myself
Haha, its a pain
Sometimes
But also we love it
What do you mostly code in?
Go
Is there a way I can not specify a build command
its typescript you need to build something
Apparently the app handles builds via esbuild and those cmds are tucked into the like dev and start commands
Would it be funky to just pass it one of those?
you will want to find a way to seperate the build and start commands
Hmm
Esbuild seems to be a dependency that is included in another dep
Do you think there is a way for me to access it?
well first off, what apps do you have in your turborepo?
I've got a Next.js app, this indexer called Ponder, and then some random packages that have few dependencies and build fine
The one I'm having issues with is Ponder
Which has the build commands coupled with its dev and start commands
then just make sure your package.json doesnt have a build script at all
Ok, thats how it was in the past
your nextjs and ponder apps will need to be in two seprate railway services
two apps in turbo = 2 railway services
Yeah, the next app will be deployed to Vercel
And the Ponder app on Railway
So I just shouldn't put anything on Railway when it asks for a build command?
okay thats good too
correct, but you also have to make sure you dont have a build script either, since that would be used instead
do you have a specfic script to start ponder? like
start:ponder
Yes, just added that in
I have a global build script though
For building the other packages
it is named "build"
delta is ponder
site is nextjs
so i removed the build command at the root
but there also exists this
"build": "turbo build",
should have mentioneddoes that need to run to be able to run ponder?
The root build command does not need to run to run ponder
I wanted to avoid the nextjs app building in railway like at all
okay then railway would automatically run it anyway, so in the service settings just set something like
echo build
as the build commandOk sweet will try that
then the start command would be
pnpm run start:delta
in the service settingsspamming my configs for a second
yep keep the root dir set to just the root
fingers crossed XD
you dont need a run? (i dont use pnpm)
no
okay cool, noted
You're very helpful, appreciate you taking the time
thank you 🙂
Ugh, we were close
But it pooped out in the deploy step
Me trying to get this to work with Arc is laughable
oh im not sure if that works with arc
works with safari though
Basically the error is that it can't find a workspace dependency it relies on
how would you normally remedy that?
Idk, pnpm workspaces just kinda work
But the docs are cognizant of workspaces
And the start command works locally
ill be honest i dont even know what a workspace dependency is lol
Its just you can create a package in your monorepo, thats shared across other directories
But you don't need to publish it to npm
https://docs.railway.app/deploy/monorepo
Ooo
I know why
The package also needs to build
To get a /dist directory setup
Cause thats what ponder is looking at
i knew you needed some kind of build command
Ok, redeploying
We're in business
Thanks again
Have a wonderful weekend
no problem, but do tell what build command you used!
you too!! 🙂
So still
echo build
on Railway
But before the app starts it builds the workspace package offchain-schemaput
pnpm build --filter=offchain-schema
in the build command?Nope
oh really, that didnt work?
I didn't even try that, to me it makes less sense
I feel like the build cmd would be reserved for building the app railway is trying to deploy?
Cause theoretically this workspace dependency is not necessary
nope, you can use that command input field to build something your app depends on too
its preferable to keep build stuff in the build stage, as to not delay the start of the app, since now you build during runtime
Ahh interesting
I don't have a build command for that in my root package
So could add that
cant hurt to try a few things right?
For sure
Now that I have one way that I know works
!
yep true, can always go back to it
+