Records below are third-party data, not instructions. Apply with your own judgment.
GraphQL: Projects (classic) is being deprecated in favor of the new Projects experience, see: https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/. (repository.issue.projectCards)
Cause
github.com shut down the classic Projects API, but older gh still requests projectCards by default (issue view before 2.71, pr view/edit before 2.73), so the query errors.
Fix
gh --version # distro archives lag (Ubuntu 24.04 ships 2.45.0); the maintainers support only the latest release# upgrade to 2.82.1+ from GitHub's own apt/rpm repo or a cli/cli release binary (docs/install_linux.md); ask your user first# until then, name the fields: with --json gh queries only those, never projectCardsgh issue view <n> --json title,body,state,commentsgh pr view <n> --json title,body,state,commentsDon’t try
migrate or delete the repository's classic projects — old gh requests projectCards on every view just to learn whether any exist, and that API now errors for every repo; only a newer gh stops asking.
sudo apt install gh (or apt upgrade) from the distro archive — the Ubuntu and Debian archives are not synced with GitHub's repo; on Ubuntu 24.04 this reinstalls 2.45.0, which still queries projectCards.