R
Railway15mo 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
Percy15mo ago
Project ID: 70bac78f-22aa-44c7-b196-a54ada2d52c8
Brody
Brody15mo 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
willOP15mo ago
nope, nothing else. is there anything else that could mess up that detection?
No description
will
willOP15mo 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
Brody15mo ago
for sure, do you have the root directory configured too?
will
willOP15mo ago
the screenshot I showed is the entire directory, there is nothing aside from that
Brody
Brody15mo ago
screenshot doesn't load show me your build logs please
will
willOP15mo ago
sorry, the screenshot above, I'll send those shortly
Brody
Brody15mo ago
(it loaded now)
will
willOP15mo ago
logs (I believe this is the correct attempt):
will
willOP15mo ago
why- did it cut most of it out
will
willOP15mo ago
will
willOP15mo ago
another possibility: what should "providers" be set to? bun isn't an option, only node is...
No description
will
willOP15mo 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
Brody15mo ago
detection worked fine, you just overwrote the providers with node in your settings
will
willOP15mo ago
when removing that, nixpacks complained with this iirc and there is no option for bun in the providers menu anyway, no worries :)
Brody
Brody15mo ago
sounds good!
Want results from more Discord servers?
Add your server