Skip to content

bug(cli): nodeup list is an unimplemented stub, contradicts README and breaks --json scripting #45

Description

@dipto0321

Describe the bug

Two related problems in the package-restore path:

  1. installPackages aborts on the first failed install. internal/packages/snapshot.go:171-179:

    for _, pkg := range pkgs {
        ...
        if err != nil {
            return err
        }
    }

    A single failed npm install -g (404, deprecated/unpublished package, transient network error) stops the loop entirely — every later package in the snapshot is silently never attempted.

  2. MigrationReport is fully dead code. internal/packages/report.go's NewMigrationReport, AddResult, and Save() have zero call sites anywhere in the repo (confirmed by repo-wide grep). Despite README/CHANGELOG describing a "migration report" as a Phase 3 deliverable, no report is ever written to <DataDir>/reports/. Failures surface only as a single cmd.Printf("Warning: restore failed: %v\n") with no per-package detail (which package failed, how many were skipped).

Suggested fix

  • Change installPackages to continue past a failed install, collecting a PackageResult per package (success/failed/skipped) instead of returning on the first error.
  • Either wire MigrationReport into this loop and write it to <DataDir>/reports/ on every restore (matching the documented feature), or remove report.go entirely if the report feature is being deprioritized — don't leave a half-built, unused type in place.

Severity

High — failed migrations are invisible to the user beyond one generic warning line, and the rest of the snapshot silently never gets restored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions