anthropics / anthropics/claude-agent-sdk-demos

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

未关闭
#48 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
2.7k
派生
427
PR 合并指标
30 天内没有已合并 PR

描述

## 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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。