Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

README Quick Start fails on macOS: Node 26 incompatibility and missing tree-sitter CLI prerequisite

未关闭 适合新手
#33 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
半天
新手友好度
75/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
冷清

调研方向

更新 README 中的 Quick Start,并在适当的情况下更新 CONTRIBUTING.md;使用 package.json 和 packages/parser-tree-sitter 的 prebuild/build 脚本确认 Node 版本和 tree-sitter CLI 的要求。使用 Node 22 和 CLI 重现文档中的 macOS 设置,然后运行 pnpm install 和 pnpm build。当全新的 Apple Silicon 设置具备完整的前置条件说明并成功完成构建时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Summary

Following the README's Quick Start on macOS (Apple Silicon, fresh Homebrew toolchain), both pnpm install and pnpm build fail out of the box. Two prerequisites are not documented.

Environment

  • macOS (Apple Silicon), Darwin 25.4.0
  • Homebrew-installed Node and pnpm
  • Repo at main (commit 4670b96)

Issue 1 — Node version ceiling not stated

The README says "Node.js >= 20", but tree-sitter@0.25.0's native binding fails to compile against Node 26's V8 headers. Homebrew's default node formula is currently 26.0.0, so anyone running brew install node lands on a broken version.

Representative error from pnpm install:

.../node_modules/tree-sitter install: /Users/.../node-gyp/26.0.0/include/node/v8-internal.h:1604:19:
  error: non-static data member 'is_convertible_v' cannot be declared as a template
.../node_modules/tree-sitter install:  error: 'is_convertible_v' cannot be specialized:
  Users are not allowed to specialize this standard library entity
.../node_modules/tree-sitter install: 3 warnings and 20 errors generated.
.../node_modules/tree-sitter install: make: *** [Release/obj.target/tree_sitter_runtime_binding/src/binding.o] Error 1
.../node_modules/tree-sitter install: gyp ERR! node -v v26.0.0
ELIFECYCLE  Command failed with exit code 1.

The repo's package.json pins volta.node to 22.22.1, which works — so Volta users are fine, but the README's plain "Node.js >= 20" guidance points the rest of us at a broken version.

Suggestion: state an upper bound (e.g. "Node 20–22 LTS") or recommend Volta explicitly so the pinned version is honored.

Issue 2 — tree-sitter CLI is a hidden prerequisite

packages/parser-tree-sitter invokes tree-sitter generate in its prebuild and build scripts, but the CLI is not a devDependency — it has to be installed system-wide. Neither the README nor CONTRIBUTING.md mentions this. (The preinstall.cjs hints at cargo install tree-sitter-cli inside a warning branch that only fires when parser.c is missing, which it usually isn't.)

pnpm install succeeds, but pnpm build fails:

@agentscript/parser-tree-sitter:build: > tree-sitter generate
@agentscript/parser-tree-sitter:build: sh: tree-sitter: command not found
ELIFECYCLE  Command failed with exit code 1.

On macOS, the fix is brew install tree-sitter-cli. Worth noting that brew install tree-sitter installs only the library — the formulas were recently split, so following an obvious-looking guess gets you the wrong package.

Suggestion: add a Prerequisites bullet for the tree-sitter CLI with install commands per OS (brew, cargo, etc.).

Working setup on macOS

brew install node@22
brew link --overwrite --force node@22
brew install tree-sitter-cli
pnpm install
pnpm build

After this, pnpm build completes cleanly (16/16 packages) and pnpm ui:dev runs.

主要语言
TypeScript
星标
267
派生
54
平均合并
48 分钟
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

salesforce/agentscript 的其他 Issue

查看 salesforce/agentscript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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