Bun now supports a text lockfile named bun.lock in addition to the existing bun.lockb binary file. The new file will become the default in the next minor Bun version, 1.2, so it would be nice if Netlify recognized the new file name.
As far as I can tell, nothing would really have to change in the implementation except the Bun version used (>=1.1.39), since the bun install command itself will give precedence to the text file if it finds both.
In order to work around the issue described above, I committed an empty bun.lockb file to my repository. This works because if bun.lock exists, Bun will use that and ignore bun.lockb. Meanwhile, the mere presence of bun.lockb “tricks” Netlify into using Bun.
For what it’s worth, my netlify.toml build.command script does the following:
Upgrades Bun to the latest version
Removes dependencies that were automatically installed with a previous Bun version
Resets to the git HEAD to undo any changes to the lockfile
Installs deps with a frozen lockfile
Runs the actual build steps
It looks something like this:
[build]
command = "bun upgrade && rm -rf node_modules && git reset --hard HEAD && bun install --frozen-lockfile && bun run build"
Hi, @jakeboone02. Would you please test using only bun.lock again now? I believe the that while the merge happened back on the 10th, it was not rolled out to production until much more recently. It should work now, though. If not, please let us know.