Skip to content

Add spm doctor that should report missing config or binaries #9

@DecampsRenan

Description

@DecampsRenan

I want to be able to run spm doctor to detect missing binaries (yarn, npm, pnpm) and also to detect bad project config (package-lock.json and yarn.lock in the same project for example).

A spm doctor --fix should allow to fix fixable issues (remove unused lock file, remove node_modules and reinstall them with the correct package manager, etc..)


Checks to perform

  • Detected package manager is installed on the system
  • Package manager version is compatible / up to date
  • Lock file is consistent with package.json (no drift)
  • node_modules exists and is not corrupted
  • Node.js version satisfies engines field (if present)

Expected output

$ spm doctor
✔ Package manager: yarn (v4.1.0)
✔ Lock file: yarn.lock is consistent
✔ node_modules: present
✔ Node.js: v20.11.0 (satisfies >=18)

All checks passed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions