Skip to content

[#663] Fix CLI build failure (corrupted lockfile)#664

Merged
realproject7 merged 1 commit intomainfrom
task/663-cli-build-fix
Mar 31, 2026
Merged

[#663] Fix CLI build failure (corrupted lockfile)#664
realproject7 merged 1 commit intomainfrom
task/663-cli-build-fix

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Regenerated package-lock.json which was missing resolution entries for tsup's transitive dependencies (bundle-require, joycon, tree-kill, etc.)
  • Root cause: corrupted lockfile — tsup@8.5.1 was installed in packages/cli/node_modules/ but its 17 transitive dependencies had no entries in the lockfile, so npm never installed them
  • Fix: full clean install (rm -rf node_modules package-lock.json && npm install) to regenerate a correct lockfile

Verification

cd packages/cli && npm run build   # ✅ succeeds — ESM dist/index.js (1.08 MB)
node dist/index.js --help          # ✅ shows CLI help

Note: acceptance criteria mentions dist/index.cjs but the build is configured for ESM format (tsup.config.ts: format: ["esm"]), so the output is dist/index.js.

Test plan

  • cd packages/cli && npm run build succeeds
  • node dist/index.js --help displays all 5 commands
  • No other files changed besides package-lock.json

Fixes #663

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 31, 2026 7:59am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b APPROVE

Lockfile-only change — correct fix for corrupted transitive dependency resolution. Reviewed:

  1. Single file changed — only package-lock.json, no source changes. Clean.
  2. Root cause is sound — tsup's transitive deps missing from lockfile explains the build failure.
  3. Version bump 0.1.11→0.1.12 in lockfile reflects current package.json state; no concern.
  4. Dependency version bumps are expected from a clean npm install picking up latest semver-compatible versions.

Minor note: T3 correctly flagged the ESM vs CJS discrepancy — acceptance criteria says dist/index.cjs but tsup config targets ESM. Worth updating the issue/docs if this matters for distribution.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

This does make the missing tsup runtime entries appear in the lockfile, but it does so by regenerating the entire monorepo lockfile and pulling in unrelated dependency updates outside the CLI build scope.

Findings

  • [medium] The fix is broader than the ticket and introduces unrelated dependency drift across the repo.
    • File: package-lock.json:330
    • Suggestion: make the build fix targeted to packages/cli by declaring the missing tsup runtime deps or pinning/adjusting the tsup dependency, then regenerate the lockfile without refreshing unrelated trees. Right now this PR also upgrades non-CLI packages such as wagmi/@wagmi/connectors (package-lock.json:13483, package-lock.json:13508) and a large set of @aws-sdk/* entries, which creates avoidable regression risk for a CLI build-only ticket.

Decision

Requesting changes because the implementation is not minimal or focused enough for #663. The build fix itself may be valid, but it should land without a repo-wide lockfile refresh.

npm workspaces failed to resolve 9 of tsup's transitive dependencies
(bundle-require, chokidar, consola, etc.) because the lockfile had
no entries for them. Adding them as explicit devDependencies in
packages/cli ensures they are always installed.

Fixes #663

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@realproject7 realproject7 force-pushed the task/663-cli-build-fix branch from 067ee31 to e9a76c6 Compare March 31, 2026 07:59
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b APPROVE (re-review after force-push)

Much cleaner — scoped to CLI workspace only. +323/-66 vs the original +1113/-939.

What changed:

  • packages/cli/package.json: 9 missing tsup transitive deps added as explicit devDependencies ✅
  • package-lock.json: corresponding lockfile entries, no unrelated dependency drift ✅

One note (non-blocking): The lockfile diff removes a stale @plotlink/sdk workspace symlink and its dependency entry from the CLI package. This appears correct — CLI's package.json doesn't list @plotlink/sdk as a dependency, so the old lockfile had a stale reference. The SDK workspace is also now marked extraneous: true. Worth confirming the CLI doesn't import from @plotlink/sdk at runtime, but this looks like lockfile cleanup, not a regression.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The revised PR narrows the fix to the CLI workspace and adds the missing tsup runtime dependencies explicitly in packages/cli/package.json, with corresponding scoped lockfile updates.

Findings

  • None blocking.

Decision

Approving because the prior scope-creep concern is resolved and the change now matches #663's intended build/dependency fix.

@realproject7 realproject7 merged commit 9b433a8 into main Mar 31, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI fix: build failure from missing tsup peer dependencies

2 participants