Skip to content

Instantly share code, notes, and snippets.

@f0rr0
Last active March 31, 2026 10:16
Show Gist options
  • Select an option

  • Save f0rr0/fc82ae690fa3efa5da00dd1ead68afda to your computer and use it in GitHub Desktop.

Select an option

Save f0rr0/fc82ae690fa3efa5da00dd1ead68afda to your computer and use it in GitHub Desktop.
Minimal repro for turbo prune generating an inconsistent bun.lock for surviving walletconnect/reown versions

turbo-prune-bun-repro

This gist contains a setup script because GitHub Gist does not preserve multiple files with the same basename such as package.json in different directories.

Setup

bash repro.sh
cd turbo-prune-bun-repro

Reproduce

bun install
bun x turbo prune @repro/backend --docker --out-dir=out
cd out/json
bun install --frozen-lockfile --ignore-scripts

Expected:

  • bun install --frozen-lockfile succeeds in out/json

Actual:

  • Bun fails with error: lockfile had changes, but lockfile is frozen

What is wrong in the pruned lockfile

The pruned out/json/bun.lock keeps newer top-level entries from the removed frontend graph, including:

  • @reown/appkit-common@1.8.19
  • @reown/appkit-controllers@1.8.19
  • @reown/appkit-ui@1.8.19
  • @reown/appkit-utils@1.8.19
  • @reown/appkit-wallet@1.8.19
  • @walletconnect/universal-provider@2.23.7

But the surviving backend graph in the same pruned lockfile still points to:

  • @reown/appkit@1.7.8
  • @walletconnect/ethereum-provider@2.21.1
  • nested @walletconnect/universal-provider@2.21.0
#!/usr/bin/env bash
set -euo pipefail
root="${1:-turbo-prune-bun-repro}"
mkdir -p "$root/apps/backend" "$root/apps/frontend"
cat >"$root/package.json" <<'EOF'
{
"name": "turbo-prune-bun-repro",
"private": true,
"workspaces": [
"apps/*"
],
"packageManager": "bun@1.3.11",
"devDependencies": {
"turbo": "2.9.1"
}
}
EOF
cat >"$root/turbo.json" <<'EOF'
{
"$schema": "https://turbo.build/schema.json",
"tasks": {}
}
EOF
cat >"$root/apps/backend/package.json" <<'EOF'
{
"name": "@repro/backend",
"private": true,
"dependencies": {
"@x402/paywall": "2.5.0"
}
}
EOF
cat >"$root/apps/frontend/package.json" <<'EOF'
{
"name": "@repro/frontend",
"private": true,
"dependencies": {
"@privy-io/react-auth": "2.25.0",
"@privy-io/wagmi": "1.0.3",
"wagmi": "2.19.5"
}
}
EOF
printf 'Wrote repro to %s\n' "$root"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment