Installing as a Pi coding-agent package fails: `prepare` needs devDependencies, but Pi installs git packages with --omit=dev

Abierto
#2,214 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@vaibhavdabas16 ya está trabajando en esto.

Desde el 25/11/2026.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
node.js, typescript
Área
devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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 build has 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)

  1. Publish skills/ in the npm tarball (add "skills" to files). Then pi install npm:@fission-ai/openspec works with zero lifecycle-script risk. This is the least invasive option and benefits every agent that can consume npm packages.
  2. Make prepare fail soft when devDependencies are absent, e.g. skip the build with a warning if typescript cannot be resolved. Pi package consumers don't need dist (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)
Lenguaje dominante
TypeScript
Estrellas
76k
Forks
5.2k
Merge medio
1 d 5 h
PR fusionados (30 d)
58

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Fission-AI/OpenSpec

Todos los issues de Fission-AI/OpenSpec

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.