Codex can't finish `bun install` with about 50 packages

I simply have a bun install in my setup script in the ‘advanced’ section, with all my packages located in my package.json

It hangs on a different package each time, and it stops installing more, eventually the job fails:

on my codex output, i’m getting:

PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
[PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
[PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
[PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
[PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
[PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks
:delivery_truck: @smithy/smithy-client… [PackageManager] waiting for 167 tasks

2 Likes

I have the same thing. My setup script and repo is very barebones, just a package.json with 8 dependencies, a bun.lock file and a bun install command in the setup script. It just stops there:

Configuring language runtimes...
+ rm -- /tmp/pXP0cs-setup_script.sh
+ cd ui
+ bun install
bun install v1.2.10 (db2e7d7f)

Ok can’t really recommend this for serious tasks, but it seems that if you enable --verbose you’ll see it generally “stabilizes” at waiting for 1-10 tasks that will never complete. So if you force restart bun install a few times it’ll eventually resolve everything:

timeout 10 bun install || true
timeout 5 bun install || true
timeout 5 bun install || true
bun install

I have the same issue trying to install a fairly simple Rails 8 application that needs to compile tailwind with esbuild. That’s hardly rocket science but Codex keeps dying. I’m guessing it might be because the VMs are so tiny they can’t even handle bun packages?

Over here it gets stuck on this:

 bunx @tailwindcss/cli -i ./app/assets/stylesheets/application.css -o ./app/assets/builds/application.css --minify
  🔍 Resolving [1/1] 
  🔍 @tailwindcss/cli [2/2] 
  🔍 @tailwindcss/cli [3/10] 
  🔍 picocolors [4/11]   🔍 @tailwindcss/node [12/38]   🔍 tailwindcss [16/46] 
  🚚 mri [18/48]   🔍 detect-libc [26/54] 
  🔍 @parcel/watcher-freebsd-x64 [46/84]   🚚 tailwindcss [70/102] 
  🚚 tailwindcss [71/102] 
  🚚 detect-libc [72/103]   🔍 lightningcss-linux-arm64-musl [88/114]   🔍 lightningcss-win32-arm64-msvc [108/127] 
  🚚 @parcel/watcher-linux-x64-glibc [120/135] 
  🔍 fill-range [122/136] 
  🚚 is-extglob [126/140]   🚚 @jridgewell/gen-mapping [128/141]   🚚 lightningcss-linux-x64-gnu [133/144]   🚚 lightningcss-linux-x64-musl [135/145] 
  🚚 lightningcss-linux-x64-musl [135/145] 
  🚚 @jridgewell/set-array [140/150] 
  🔍 is-number [142/151] 
  🚚 is-number [146/154] 
  🚚 is-number [147/154] 
  🚚 is-number [147/154] 
  🚚 is-number [147/154] 
  🚚 is-number [147/154] 

Always a different package… But always gets stuck. Even restarting it 5 times doesn’t do it, it just gets stuck each time:

→ timeout 30 rails css:build
bun install v1.2.13 (64ed68c9)
Checked 79 installs across 132 packages (no changes) [6.00ms]
$ bunx @tailwindcss/cli -i ./app/assets/stylesheets/application.css -o ./app/assets/builds/application.css --minify
🔍 Resolving [1/1] 🔍 @tailwindcss/cli [2/2] 🔍 @tailwindcss/cli [3/10] 🔍 mri [4/11] 🔍 @tailwindcss/oxide [12/38] 🔍 tailwindcss [19/62] 🚚 picocolors [20/63] 🔍 node-addon-api [25/67] 🔍 @parcel/watcher-win32-ia32 [50/88] 🔍 @tailwindcss/oxide-android-arm64 [70/105] 🔍 @tailwindcss/oxide-linux-arm-gnueabihf [86/120] 🔍 @tailwindcss/oxide-win32-arm64-msvc [92/123] 🔍 @tailwindcss/oxide-win32-arm64-msvc [93/123] 🔍 @tailwindcss/oxide-linux-arm64-gnu [95/124] 🔍 picomatch [102/128] 🚚 tapable [112/136] 🚚 jiti [126/147] 🚚 @tailwindcss/oxide-linux-x64-gnu [138/158] 🚚 @tailwindcss/oxide-linux-x64-musl [141/159] 🚚 braces [142/160] 🚚 tslib [146/162] 🚚 @jridgewell/gen-mapping [154/166] 🚚 @napi-rs/wasm-runtime [162/173] 🚚 @napi-rs/wasm-runtime [165/175] 🚚 fill-range [166/176] 🚚 @jridgewell/sourcemap-codec [172/181] 🚚 to-regex-range [174/182] 🚚 to-regex-range [177/184] 🚚 is-number [178/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] 🚚 is-number [179/185] bin/rails aborted!
SignalException: SIGTERM (SignalException)
Tasks: TOP => css:build
(See full trace by running task with --trace)
error: script "build:css" was terminated by signal SIGTERM (Polite quit request)
→ true
→ timeout 30 rails css:build
bun install v1.2.13 (64ed68c9)
Checked 79 installs across 132 packages (no changes) [11.00ms]
$ bunx @tailwindcss/cli -i ./app/assets/stylesheets/application.css -o ./app/assets/builds/application.css --minify
🔍 Resolving [1/1] 🔍 @tailwindcss/cli [2/2] 🔍 @tailwindcss/cli [3/9] 🔍 picocolors [4/10] 🔍 enhanced-resolve [10/30] 🔍 tailwindcss [14/40] 🔍 tailwindcss [15/40] 🔍 @tailwindcss/oxide [17/54] 🔍 detect-libc [22/59] 🔍 @parcel/watcher-linux-arm64-musl [42/70] 🔍 @parcel/watcher-darwin-x64 [51/74] 🔍 tar [55/83] 🔍 @tailwindcss/oxide-android-arm64 [58/85] 🔍 @tailwindcss/oxide-darwin-x64 [73/92] 🔍 @tailwindcss/oxide-linux-arm-gnueabihf [82/107] 🔍 @tailwindcss/oxide-win32-x64-msvc [85/108] 🔍 minizlib [88/110] 🔍 tslib [100/121] 🔍 @emnapi/runtime [119/131] 🚚 @isaacs/fs-minipass [126/135] 🚚 @jridgewell/resolve-uri [128/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] 🚚 @jridgewell/resolve-uri [129/136] error: script "build:css" was terminated by signal SIGTERM (Polite quit request)
bin/rails aborted!
SignalException: SIGTERM (SignalException)
Tasks: TOP => css:build
(See full trace by running task with --trace)
→ true

This is my poor attempt at a setup script to get a rails 8 app going, in case it helps anyone:

#!/usr/bin/env bash
set -euo pipefail
apt-get update -qq
apt-get install -yqq wget unzip libyaml-dev build-essential curl git libssl-dev libreadline-dev zlib1g-dev xz-utils ca-certificates wget libpq-dev vim postgresql

pg_ctlcluster --skip-systemctl-redirect 16 main start
su - postgres -c "createuser -s $(whoami)"

gem install bundler
yarn install
bun upgrade
timeout 10 bun install || true
timeout 5 bun install || true
timeout 5 bun install || true
timeout 5 bun install || true
timeout 5 bun install || true
bun install

bundle

bundle update irb

bin/rails db:prepare

timeout 30 rails css:build || true
timeout 30 rails css:build || true
timeout 30 rails css:build || true
timeout 30 rails css:build || true
timeout 30 rails css:build || true

So in case someone else is following this, I managed to get the deploy working by forcing Rails to switch to npx instead of bun. To do this, I cleared and replaced the build:css task, updated the Procfile.dev, and updated the packages.json file. That did it. Turns out bun was what was spinning out of control. No bun, no problem.

1 Like