Skip to content

squad version fails on Node 20 LTS: node:sqlite requires Node >= 22.5.0 #896

Closed

Description

@paulyuk

Bug Report

Command: squad version

Error:

✗ Squad requires Node.js ≥22.5.0 (you have v20.18.3).
  node:sqlite (required by the Copilot SDK for session storage) was added in Node 22.5.0.
  Upgrade at: https://nodejs.org/en/download

Environment:

  • OS: Windows
  • Node.js: v20.18.3 (current Active LTS)
  • Squad CLI: @bradygaster/squad-cli ^0.9.4-insider.1
  • Repo: dispatch-insiders template

Problem:
Squad CLI refuses to run on Node 20 LTS because the Copilot SDK depends on node:sqlite, which was introduced in Node 22.5.0. Even a simple squad version command fails.

Node 20 is still the Active LTS release and widely used. Requiring Node 22.5.0+ is a significant barrier to adoption.

Expected behavior:

  • Squad should either work on Node 20 LTS (e.g. by using an alternative SQLite binding like better-sqlite3 as a fallback), or
  • The minimum Node version should be clearly documented in the README and package.json engines field so users know before installing.

Suggestion:
Consider offering a fallback storage provider for environments running Node < 22.5.0, or at minimum pin engines.node in package.json so npm install warns early.

Activity

  1. paulyuk commented on Apr 7, 2026

    @paulyuk
    ContributorAuthor

    Workaround found

    The error occurs when NVM (Node Version Manager) defaults to a Node 20 LTS version, even if Node 22+ is installed system-wide. NVM overrides the system Node in shells where it activates.

    Fix:

    nvm install 22
    nvm use 22.22.2
    

    After switching to Node 22, squad version works fine (confirmed with 0.9.4-insider.1).

    Suggestion for the project:

    • Consider adding an engines field to package.json ("node": ">=22.5.0") so npm install warns users early.
    • The onboard.ps1 script in dispatch-insiders checks for Node 20+ (line 42: if ($nodeMajor -lt 20)), which passes but squad itself needs 22.5.0+. This mismatch is confusing — the prereq check says ✅ but squad fails immediately after.
  2. bradygaster commented on Apr 8, 2026

    @bradygaster
    Collaborator

    Closing — Squad requires Node >= 22.5.0 (documented in package.json engines field) because the Copilot SDK depends on node:sqlite. NVM or fnm makes it easy to switch versions. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions