Skip to content

Error Handling & Validation Improvements #45

@Josephat-S

Description

@Josephat-S

What to build

Improve error handling throughout the CLI. Currently, if something goes wrong mid-generation (e.g., network failure during tiged clone, disk full), the error messages are generic. We need specific, actionable error messages.

Files to modify

  • src/generate.js
  • index.js

Specs

  • Detect and handle: network errors (tiged), disk space issues, permission errors, invalid project names.
  • If generation fails partway, clean up the partial directory.
  • Warn if node_modules already exists in the target directory.
  • Warn if selecting Vite SPA for E-Commerce (SEO concern).

Acceptance criteria

  • Network failure during template fetch shows: "Could not reach GitHub. Check your internet connection."
  • Invalid project name (spaces, uppercase) is caught before generation starts.
  • Partial project directory is cleaned up on failure.
  • Vite + E-Commerce combination shows a warning (but still allows it).
  • All error messages include a suggested fix.

Dependencies

  • None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions