[Workers Build] bun: not found error

Cloudflare Workers is deployed using the build function. The project uses Bun, and the build process runs bun install --frozen-lockfile, although I have not specifically configured the build. I am getting the following error here, which prevents me from deploying. Deployment was successful until 21 hours ago, but now it is failing. Please help. Below is the build log.
11:01:03.697 Initializing build environment...
11:01:14.054 Success: Finished initializing build environment
11:01:14.058 Cloning repository...
11:01:15.213 Detected the following tools from environment: [email protected], [email protected], [email protected]
11:01:15.214 Installing project dependencies: bun install --frozen-lockfile
11:01:15.220 /bin/sh: 1: bun: not found
11:01:15.221 Failed: error occurred while installing tools or dependencies
11:01:03.697 Initializing build environment...
11:01:14.054 Success: Finished initializing build environment
11:01:14.058 Cloning repository...
11:01:15.213 Detected the following tools from environment: [email protected], [email protected], [email protected]
11:01:15.214 Installing project dependencies: bun install --frozen-lockfile
11:01:15.220 /bin/sh: 1: bun: not found
11:01:15.221 Failed: error occurred while installing tools or dependencies
4 Replies
shun
shunOP3mo ago
Cloudflare Workers is deployed using the build function. The project uses Bun, and the build process runs bun install --frozen-lockfile, although I have not specifically configured the build. I am getting the following error here, which prevents me from deploying. Deployment was successful until 21 hours ago, but now it is failing. Please help. Below is the build log. 11:01:03.697 Initializing build environment... 11:01:14.054 Success: Finished initializing build environment 11:01:14.058 Cloning repository... 11:01:15.213 Detected the following tools from environment: [email protected], [email protected], [email protected] 11:01:15.214 Installing project dependencies: bun install --frozen-lockfile 11:01:15.220 /bin/sh: 1: bun: not found 11:01:15.221 Failed: error occurred while installing tools or dependencies I removed bun.lockb and now npm install runs. So I am wondering if simply bun is being removed from the build server.
Walshy
Walshy3mo ago
We should support bun... i'll raise this with the team. Thanks for reporting!
Maximo
Maximo3mo ago
Hey Shun, really sorry you're experiencing this, we're working on a fix for bun that should be ready to go tomorrow @shun Hey Shun, this should now be fixed!
shun
shunOP3mo ago
@Maximo @Walshy | Deploying Thank you for your prompt response! Once I had solved the problem with the following steps. Please refer to it! 1. fix BUN_VERSION in the build variable to 1.1.0 2. execute the following shell in the build command
#! /bin/bash
# ! !work around!
curl -fsSL https://bun.sh/install | bash
export BUN_INSTALL="$HOME/.bun”
export PATH="$BUN_INSTALL/bin:$PATH”
bun --version

bun install
#! /bin/bash
# ! !work around!
curl -fsSL https://bun.sh/install | bash
export BUN_INSTALL="$HOME/.bun”
export PATH="$BUN_INSTALL/bin:$PATH”
bun --version

bun install
3. push to the linked branch on github and execute build I confirmed that it was cured! Thank you!
Want results from more Discord servers?
Add your server