opcn1214-generator: the npm package ships only its two dist entry files and can't be imported (same for shaam-uniform-format-generator)

Abierto Apto para principiantes
#5,256 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
83/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
nodejs, typescript

Línea de trabajo

Lee los archivos package.json de packages/opcn1214-generator y packages/shaam-uniform-format-generator y luego ejecuta yarn pack --dry-run en cada paquete. Añade el contenido de dist indicado a los archivos de los paquetes y confirma que las ejecuciones de prueba incluyen los directorios dist completos, sin src, tests, .bob ni documentación. El issue también describe la importación de snapshots alpha recientes y la resolución de sus tipos TypeScript como comprobaciones de finalización.

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

Descripción

1214 annual-audit-workflow

Problem

The published @accounter/opcn1214-generator package can't be imported. The alpha published on 2026-11-30 (0.2.0-alpha-20261130163912-63f117c7…) contains only two files from dist/:

  • dist/esm/index.js
  • dist/cjs/index.js

index.js re-exports from ./api/generate.js, ./api/parse.js, ./api/response.js, ./layout/registry.js and other modules, none of which are in the tarball. So

import { generate1214 } from '@accounter/opcn1214-generator';

fails with ERR_MODULE_NOT_FOUND. dist/typings/ is missing too, so TypeScript finds no types.

The tarball also carries files a consumer doesn't need:

  • .bob/ (285 files)
  • src/
  • tests/, including the fixtures
  • documentation/, including the 1.5 MB form PDF
  • scripts/, CLAUDE.md and the tsconfigs

That comes to 481 files and 6.2 MB unpacked.

Cause

packages/opcn1214-generator/.gitignore lists dist, and package.json has no files field. npm then uses .gitignore for exclusions and keeps only the entry files it always includes (main, module).

The same bug in shaam-uniform-format-generator

@accounter/[email protected], the current latest, is built the same way:

  • its .gitignore lists dist/, and package.json has no files field;
  • the tarball has only dist/esm/index.js and dist/cjs/index.js, which re-export ./types/index.js, ./generator/index.js and ./parser/index.js;
  • it also ships src/, tests/, spec.md, prompt_plan.md and todo.md.

shaam6111-generator and pcn874-generator have no package .gitignore, so they probably ship dist/, but also their sources. Worth checking while fixing this.

Fix

Add "files": ["dist"] to package.json in both packages. npm always includes package.json, README and LICENSE on top of that. During the review of #5076, yarn pack --dry-run with this field listed all of dist/ and nothing else. That run used stand-in dist files.

Done when

  • yarn pack --dry-run in each package lists the full dist/ (esm, cjs, typings) and no src/, tests/, .bob/ or documentation.
  • A fresh alpha snapshot of each package imports in a scratch project, and tsc resolves its types.
  • Optional: a CI step that packs each published package and imports it, so this can't come back.

Found while reviewing #5076 (H4, release wiring). Its minor changeset would publish the same broken tarball as a stable release. The review wasn't posted because the PR merged first. Re-checked on main at 31245bc7f and against the npm registry on 2026-11-30.

Lenguaje dominante
TypeScript
Estrellas
30
Forks
10
Merge medio
2 d 12 h
PR fusionados (30 d)
276

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 Urigo/accounter-fullstack

Todos los issues de Urigo/accounter-fullstack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.