Bun failing builds

I want to use bun to run my cloudflare builds however it fails every time and not sure why, this is my stack trace:
12:05:01.271 Cloning repository...
12:05:01.953 From https://github.com/jacobsamo/website
12:05:01.954 * branch e783baa52cc0afe5427458b8a143b9beb00a07f4 -> FETCH_HEAD
12:05:01.954
12:05:01.991 HEAD is now at e783baa set package manager in package.json
12:05:01.992
12:05:02.085
12:05:02.085 Using v2 root directory strategy
12:05:02.115 Success: Finished cloning repository files
12:05:07.642 Checking for configuration in a wrangler.toml configuration file (BETA)
12:05:07.643
12:05:07.643 Found wrangler.toml file. Reading build configuration...
12:05:07.649 pages_build_output_dir: dist
12:05:07.649 Build environment variables: (none found)
12:05:07.764 Successfully read wrangler.toml file.
12:05:07.922 Detected the following tools from environment: [email protected], [email protected]
12:05:07.923 Installing bun 1.1.22
12:05:08.071 Downloading Bun v1.1.22...
12:05:08.279 curl: (22) The requested URL returned error: 404
12:05:08.283 Fail: Couldn't download the Bun binary from https://github.com/oven-sh/bun/releases/download/bun-v1.1.22/bun-linux-x64.zip
12:05:08.289 Fail: Failed to download Bun v1.1.22
12:05:08.300 Error: Exit with error code: 1
12:05:08.301 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
12:05:08.301 at Object.onceWrapper (node:events:652:26)
12:05:08.301 at ChildProcess.emit (node:events:537:28)
12:05:08.301 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
12:05:08.311 Failed: build command exited with code: 1
12:05:09.461 Failed: error occurred while running build command
12:05:01.271 Cloning repository...
12:05:01.953 From https://github.com/jacobsamo/website
12:05:01.954 * branch e783baa52cc0afe5427458b8a143b9beb00a07f4 -> FETCH_HEAD
12:05:01.954
12:05:01.991 HEAD is now at e783baa set package manager in package.json
12:05:01.992
12:05:02.085
12:05:02.085 Using v2 root directory strategy
12:05:02.115 Success: Finished cloning repository files
12:05:07.642 Checking for configuration in a wrangler.toml configuration file (BETA)
12:05:07.643
12:05:07.643 Found wrangler.toml file. Reading build configuration...
12:05:07.649 pages_build_output_dir: dist
12:05:07.649 Build environment variables: (none found)
12:05:07.764 Successfully read wrangler.toml file.
12:05:07.922 Detected the following tools from environment: [email protected], [email protected]
12:05:07.923 Installing bun 1.1.22
12:05:08.071 Downloading Bun v1.1.22...
12:05:08.279 curl: (22) The requested URL returned error: 404
12:05:08.283 Fail: Couldn't download the Bun binary from https://github.com/oven-sh/bun/releases/download/bun-v1.1.22/bun-linux-x64.zip
12:05:08.289 Fail: Failed to download Bun v1.1.22
12:05:08.300 Error: Exit with error code: 1
12:05:08.301 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
12:05:08.301 at Object.onceWrapper (node:events:652:26)
12:05:08.301 at ChildProcess.emit (node:events:537:28)
12:05:08.301 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
12:05:08.311 Failed: build command exited with code: 1
12:05:09.461 Failed: error occurred while running build command
I have removed the bun.lockb and added to .gitignore beacuse that too was failing now it is set through package.json with this line: "packageManager": "[email protected]" not sure how to fix this
3 Replies
Chaika
Chaika5mo ago
The latest release of bun is 1.1.21 as far as I can see https://github.com/oven-sh/bun/releases
GitHub
Releases · oven-sh/bun
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one - oven-sh/bun
Chaika
Chaika5mo ago
It's just going off releases in that repo so 1.1.22 doesn't exist there and therefor can't be downloaded
Jacob
JacobOP5mo ago
Yeh that seemed to stop it failing the download thank you It is now saying that astro command is not found
12:16:29.435 Installing Bun v1.1.21...
12:16:29.528 Bun v1.1.21 is installed successfully!
12:16:29.984 Executing user command: bun run build
12:16:30.208 $ astro check && astro build
12:16:30.211 /usr/bin/bash: line 1: astro: command not found
12:16:30.212 error: script "build" exited with code 127
12:16:30.214 Failed: Error while executing user command. Exited with error code: 127
12:16:30.224 Failed: build command exited with code: 1
12:16:31.033 Failed: error occurred while running build command
12:16:29.435 Installing Bun v1.1.21...
12:16:29.528 Bun v1.1.21 is installed successfully!
12:16:29.984 Executing user command: bun run build
12:16:30.208 $ astro check && astro build
12:16:30.211 /usr/bin/bash: line 1: astro: command not found
12:16:30.212 error: script "build" exited with code 127
12:16:30.214 Failed: Error while executing user command. Exited with error code: 127
12:16:30.224 Failed: build command exited with code: 1
12:16:31.033 Failed: error occurred while running build command
never mind i got it all working again had to add the bun.lockb back so it would download the pckages
Want results from more Discord servers?
Add your server