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

オープン 初心者向け
#5,256 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
83/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
nodejs, typescript

調査の方向性

packages/opcn1214-generator と packages/shaam-uniform-format-generator の package.json ファイルを読み、各パッケージで yarn pack --dry-run を実行してください。記載されている dist の内容をパッケージアーカイブに追加し、ドライランに src、tests、.bob、ドキュメントを含まない dist ディレクトリ全体が含まれることを確認してください。issue では、最新の alpha スナップショットのインポートと、その TypeScript 型の解決も完了確認項目として説明されています。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
30
フォーク
10
平均マージ
2日 12時間
マージ済み PR(30日)
276

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Urigo/accounter-fullstack のほかの issue

Urigo/accounter-fullstack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。