Enabling bun on shared monorepo (turborepo) when using npm as package manager?
Hi all! I use NPM as my package manager for my shared monorepo (turborepo), and because of that I don't think Nix detects/enables bun?
I get an error saying it can't be found when trying to startup my backend websocket server.
Solution:Jump to solution
add a service variable
NIXPACKS_CONFIG_FILE
set to /apps/ws_server/nixpacks.toml
cancel the auto deploy
add a nixpacks.toml file to the ws_server folder with this in it
```toml
[phases.setup]...29 Replies
Project ID:
f0b123dd-49d4-4bfc-b063-9a5238f876ef
Railway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
would it be possible for you to share your repo?
What's your github? I can add you as a reader if that helps
it sure does, brody192
what app do you want to run with bun?
my websocket server
apps/ws_server
are you deploying all 3 of these apps to railway?
no, only the websocket server, the web app is a nextjs application deployed on vercel, and experiments is just various scripts for me to try different things in a dev environment using the codebase (not to be deployed)
I have the build and start commands filter accordingly
turbo run build --filter=ws_server and turbo run start --filter=ws_server should only build the deps for ws_server from what I understand
and you set those in the service settings?
here right?
yeah thats good, let me see what i can whip up, few minutes please
(slightly different question but will the round-robin load balancer break ws connections once they've been established and upgraded?)
i cant see how they would, upgrades arent new connections are they?
gotcha, just double checking, i had a lot of reliability issues with the websockets a month ago when i first launched and wasn't sure if cloudflare or railway load balancer could affect things
this is my overhaul / rewrite that I'm bringing online
great, ty <a:party_blob:1003159778480095283>
you want the latest bun right?
yup!
Solution
add a service variable
NIXPACKS_CONFIG_FILE
set to /apps/ws_server/nixpacks.toml
cancel the auto deploy
add a nixpacks.toml file to the ws_server folder with this in it
not tested, so let me know if you run into any issues
pushed, waiting for deploy
keep me posted
woohoo we in business!!
all set?
all set, thank you!
no problem!
feel free to remove me from the repo when you want
will do, thanks for the help