npm installer does not handle transient download errors

Author: adamtheturtleCreated Sep 13, 2026Updated Sep 14, 2026
Labelsnpm

The tree-sitter-cli npm installer exits on a transient GitHub release download error because crates/cli/npm/install.js does not attach an error handler or retry the request.

Recent GitHub Actions failure with [email protected]:

https://github.com/adamtheturtle/literalizer/actions/runs/34473794312/job/102859624105

Downloading https://github.com/tree-sitter/tree-sitter/releases/download/v0.26.8/tree-sitter-linux-x64.gz
Error: read ECONNRESET

A bounded retry for transient request/socket failures would prevent a momentary reset from failing npm ci. Failed attempts should also remove the partial executable before retrying.