Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

No prepack/prepublishOnly build guard: a manual npm publish ships stale/missing dist/

Closed
#336 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #406 by @Kuldeep2822k — merged

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
20/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
nodejs, typescript

Research direction

The problem sits in package.json around lines 21-35, where main, types, bin and the build-copied dist/package.json are defined, and no prepack or prepublishOnly script exists. Read the scripts block and check what the build step produces in dist/. Done means a manual npm publish or npm pack rebuilds dist/ first. Pull request #406 already targets this, so review or extend that work rather than starting a new change.

Written by the indexing model from the issue text.

Description

build priority: medium

Location: package.json:21-35

Publishing depends entirely on dist/ (main/types/bin + the build-copied dist/package.json imported at runtime). With no prepare/prepack/prepublishOnly, 'npm publish' from a clean or stale checkout ships a tarball with absent/outdated compiled output; a missing dist/package.json crashes the CLI on --version. (CI is safe; manual publish is not.)

Fix: Add "prepack": "npm run build" (or prepublishOnly).

From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
17h 12m
Merged PRs (30d)
167

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Kuldeep2822k/cli

All issues in Kuldeep2822k/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.