anthropics / anthropics/claude-agent-sdk-demos

excel-demo: bun install fails due to electron-builder incompatibility

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
427
PR merge metrics
No merged PRs in 30d

Description

## Description

The README for `excel-demo` suggests bun can be used (`bun install`), but `bun install` fails due to incompatibility between bun and electron-builder's postinstall script.

## Steps to Reproduce

1. Clone the repo
2. `cd excel-demo`
3. Run `bun install`

## Error Output

```
$ bun install
bun install v1.3.5 (1e86cebd)

$ ts-node .erb/scripts/check-native-dep.ts && electron-builder install-app-deps && bun run build:dll
• electron-builder version=25.1.8
• loaded configuration file=package.json ("build" field)
• installing production dependencies platform=darwin arch=arm64 appDir=/Users/.../excel-demo/release/app
⨯ /Users/.../.local/state/fnm_multishells/.../bin/node process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
Error output:
/opt/homebrew/Cellar/bun/1.3.5/bin/bun:1
����

SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1692:18)
...
```

## Root Cause

electron-builder's `install-app-deps` command spawns a Node.js subprocess, but when bun is used, the node binary resolution gets confused and tries to execute the bun binary as a Node.js script, causing a syntax error.

## Suggested Fix

Either:
1. Update the README to clarify that `npm install` must be used (not bun)
2. Or add a note in the README about this known incompatibility

## Environment

- macOS (Apple Silicon)
- bun v1.3.5
- Node.js v24.12.0
- electron-builder v25.1.8

## Workaround

Use `npm install` instead of `bun install`. Running the app with `bun start` works fine after dependencies are installed with npm.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.