Skip to content

Fix build scripts to use bun instead of pnpm#17

Merged
stefan-burke merged 4 commits into
mainfrom
claude/fix-build-errors-eIhCq
Apr 23, 2026
Merged

Fix build scripts to use bun instead of pnpm#17
stefan-burke merged 4 commits into
mainfrom
claude/fix-build-errors-eIhCq

Conversation

@stefan-burke
Copy link
Copy Markdown
Member

Summary

  • Replace pnpm install with bun install in scripts/prepare-dev.js
  • Replace pnpm exec eleventy with bun run build in scripts/build.js

Why

The project is bun-only (package.json has "packageManager": "bun"), but the build scripts were calling pnpm. This caused two failures:

  1. pnpm install rejected with "This project is configured to use bun"
  2. pnpm exec eleventy same rejection

Switching to bun run build (which runs bun scripts/eleventy-build.js) also fixes a secondary error: the template's reviews.js calls Bun.file() — a Bun-only API — which was crashing when eleventy was invoked via bunx (Node.js runtime). Running via bun run build ensures the Bun runtime is used throughout.

Test plan

  • bun run build completes successfully and writes 42 files to _site/

https://claude.ai/code/session_01C2QdU9Djkt7xZ2hxusFHsC


Generated by Claude Code

claude added 4 commits April 23, 2026 20:58
Replace pnpm install/exec calls with bun equivalents so the build works
in this bun-only project. Also switch from `bunx eleventy` to
`bun run build` so the Bun runtime is used and Bun.file() APIs
in reviews.js are available.

https://claude.ai/code/session_01C2QdU9Djkt7xZ2hxusFHsC
Replace pnpm setup/install/exec steps with bun equivalents.
Also update sparse-checkout to fetch bun.lock and bunfig.toml
instead of pnpm-lock.yaml, since the template is bun-only.

https://claude.ai/code/session_01C2QdU9Djkt7xZ2hxusFHsC
The eleventy-build.js entrypoint lives in the template's scripts/
directory, which wasn't included in the sparse-checkout. This caused
the 'Build Site' job to fail with a file-not-found error.

https://claude.ai/code/session_01C2QdU9Djkt7xZ2hxusFHsC
- Add packages/ to sparse-checkout so #toolkit/* path alias resolves
- Cache node_modules alongside .image-cache (keyed on bun.lock hash)
  so bun install is fast on repeat runs, matching chobble-client setup

https://claude.ai/code/session_01C2QdU9Djkt7xZ2hxusFHsC
@stefan-burke stefan-burke merged commit 4458bfb into main Apr 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants