R
Railway9mo ago
will

bun: command not found

Hello, I'm trying to migrate my project to bun to make TS easier, and I'm when deploying, the logs get spammed with "/bin/bash: line 1: bun: command not found". I have a bun.lockb file, so it should auto-detect bun, no? My start command is bun run start which runs bun --smol run src/main.ts Please let me know what more I can provide! Project ID: 70bac78f-22aa-44c7-b196-a54ada2d52c8
18 Replies
Percy
Percy9mo ago
Project ID: 70bac78f-22aa-44c7-b196-a54ada2d52c8
Brody
Brody9mo ago
do you have a left over lock file from npm/pnpm/yarn? if any of those are detected your build will still use node, if you're gonna switch to bun you gotta fully commit
will
will9mo ago
nope, nothing else. is there anything else that could mess up that detection?
No description
will
will9mo ago
hrm, after removing the NIXPACKS_PKGS variable (that was set to python39 gcc), the build process throws "Nixpacks was unable to generate a build plan for this app.", and it lists the contents of src, not the root directory is that why it is messing up somehow?
Brody
Brody9mo ago
for sure, do you have the root directory configured too?
will
will9mo ago
the screenshot I showed is the entire directory, there is nothing aside from that
Brody
Brody9mo ago
screenshot doesn't load show me your build logs please
will
will9mo ago
sorry, the screenshot above, I'll send those shortly
Brody
Brody9mo ago
(it loaded now)
will
will9mo ago
logs (I believe this is the correct attempt):
will
will9mo ago
why- did it cut most of it out
will
will9mo ago
another possibility: what should "providers" be set to? bun isn't an option, only node is...
No description
will
will9mo ago
ahg that was it! @Brody so sorry to bother you, I resolved the issue by creating a nixpacks.toml file with providers = ["bun"]. I guess the detection might be buggy?
Brody
Brody9mo ago
detection worked fine, you just overwrote the providers with node in your settings
will
will9mo ago
when removing that, nixpacks complained with this iirc and there is no option for bun in the providers menu anyway, no worries :)
Brody
Brody9mo ago
sounds good!