Installing as a Pi coding-agent package fails: `prepare` needs devDependencies, but Pi installs git packages with --omit=dev
维护者通常 1 天内回复
@vaibhavdabas16 已经在做这个了。
开始于 2026年11月25日。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 66/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
- 领域
- devtools
调研方向
Start by reproducing the install with npm install --omit=dev --legacy-peer-deps and inspect package.json’s files and prepare entries, then trace the typescript resolution failure in build.js. Compare the two suggested fixes against how Pi discovers package skills and consumes the npm tarball. Done means Pi can install and access the official skills through a supported install path.
由索引模型根据 Issue 内容生成。
描述
Summary
pi install https://github.com/Fission-AI/OpenSpec fails on the current Pi coding agent. Pi checks out this repo and runs npm install --omit=dev ...; the prepare script (node build.js) then fails because typescript lives in devDependencies. This blocks Pi users from installing OpenSpec as an updatable git-source package — which matters because the repo's conventional skills/ directory is exactly what Pi loads as package skills. The npm tarball does not ship skills/ (the files field only includes dist, bin, schemas), so there is currently no way to get the official OpenSpec skills into Pi.
Repro
pi install https://github.com/Fission-AI/OpenSpec
# -> install fails (build phase)
# equivalent manual repro:
git clone --depth 1 https://github.com/Fission-AI/OpenSpec && cd OpenSpec
npm install --omit=dev --legacy-peer-deps
> @fission-ai/[email protected] prepare
> node build.js
🔨 Building OpenSpec...
Compiling TypeScript...
❌ Build failed!
npm error code 1
npm error command failed
npm error command ... node build.js
build.js fails at require.resolve('typescript/bin/tsc') because typescript is a devDependency and is not installed under --omit=dev. Pi then removes the checkout and aborts the install.
Why Pi installs this way
Pi (earendil-works/pi) intentionally installs git packages with production dependencies only — packages/coding-agent/src/core/package-manager.ts → getGitDependencyInstallArgs() returns ["install", "--omit=dev", "--legacy-peer-deps", "--no-audit", "--no-fund"]. So any prepare script that requires devDependencies makes a repo uninstallable as a Pi package.
Context
prepare: pnpm run buildhas been present since v1.0.0.- A user reports OpenSpec installed fine on an older Pi version; current Pi versions install git-package dependencies (triggering
prepare), which is when this started failing. - Pi auto-discovers the conventional
skills/directory, so a working git-source install would give Pi users the official opsx skills and stay updatable from Pi/Cindy settings.
Suggested fixes (either would unblock)
- Publish
skills/in the npm tarball (add"skills"tofiles). Thenpi install npm:@fission-ai/openspecworks with zero lifecycle-script risk. This is the least invasive option and benefits every agent that can consume npm packages. - Make
preparefail soft when devDependencies are absent, e.g. skip the build with a warning iftypescriptcannot be resolved. Pi package consumers don't needdist(they use the separately installed CLI), while CLI-from-git users would still get a real build on a full dev install.
Environment
- Pi 1.5.0 (via Cindy), Windows 11
- node v22.23.2, npm 10.9.8
- Fission-AI/OpenSpec
main@ 1.16.1 (2026-11-07)
- 主要语言
- TypeScript
- 星标
- 76k
- 派生
- 5.2k
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 58
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Fission-AI/OpenSpec 的其他 Issue
-
enhancement needs-triage
难度 2/5 1-3 小时 新手友好度 74/100
Fission-AI/OpenSpec#2337 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
Fission-AI/OpenSpec#2311 ·
维护者通常 1 天内回复
-
sync-specs skill overwrites an existing ADDED requirement, contradicting the CLI's no-op/conflict rule from #1376可能重新可做 @vaibhavdabas16 于 10 天前认领,目前没有进行中的 PR。 未关闭approved
难度 1/5 1 小时以内 新手友好度 86/100
Fission-AI/OpenSpec#2289 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 76/100
Fission-AI/OpenSpec#2208 · 2 条评论 ·
维护者通常 1 天内回复
-
Document the RFC 2119 keyword rule (attribution lost in docs rebuild) and its clarification update RFC 8174可能已有人在做 @sofiaali1521-cloud 于 5 天前认领。 未关闭documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
Fission-AI/OpenSpec#2200 · 5 条评论 ·
维护者通常 1 天内回复
查看 Fission-AI/OpenSpec 的全部 Issue
相似的 Issue
-
Media browser returns "Not found" for repositories using the SHA-256 object format可能已有人在做 @adamchodera 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
janhesters/remixcn#318 ·
维护者通常 1 天内回复
-
Interceptor LaunchTestProfile.sh: no Windows (Git Bash/MSYS) branch, test profile never launches未关闭
难度 2/5 1-3 小时 新手友好度 84/100
danielmiessler/LifeOS#3150 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
Make the "%" unit spacing the same in the web and in A10可能已有人在做 @kragent66-glitch 今天认领。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 条评论 ·