Monorepo Builds keep using npm instead of bun

As title says, I keep having the issue that the automatic builds correctly identify bun and it's version but proceed trying to install with npm. Can I somehow force Cloudflare Build to use bun over npm?
8 Replies
RiskyMH
RiskyMH11mo ago
is there a chance you are using the new text lockfile format of bun.lock or do you have your bun.lockb file in the monorepo package/app and not root?
makisuo
makisuoOP11mo ago
issue is in most workflows I use the package directory as the root directory, meaning the lockfile isnt found by the CF CI defaulting to npm. I would just really like to force it to use bun rather than switching the app root.
RiskyMH
RiskyMH11mo ago
Ah i see, this is where vercel makes it easier with custom install script
makisuo
makisuoOP11mo ago
Yeah don’t really understand though why this isn’t an option here doesn’t seem too much 🥲
iRazvan2745
iRazvan274510mo ago
same issue happening to me @Makisuo did you find a fix? ohh vercel how did you do it tho?
i40west
i40west10mo ago
You can set an environment variable SKIP_DEPENDENCY_INSTALL (to any value) and then put whatever installation you need in your build command.
Barrel Of Lube
Barrel Of Lube10mo ago
this worked
RiskyMH
RiskyMH6mo ago
Looks like the new V3 build version has updated the default bun verswion However, it doesn't appear to actually support auto-install when bun.lock sadly 😔

Did you find this page helpful?