Skip to content

fix(musicSearch): replace broken request-promise with native fetch#2

Open
garrettwinder wants to merge 1 commit intomasterfrom
worktree-agent-a802f771
Open

fix(musicSearch): replace broken request-promise with native fetch#2
garrettwinder wants to merge 1 commit intomasterfrom
worktree-agent-a802f771

Conversation

@garrettwinder
Copy link
Copy Markdown
Owner

Summary

  • request-promise is pinned to ^0.0.1, a long-abandoned package whose main field points to a missing lib/tp.js, causing node server.js to crash at startup via lib/helpers/require-dir.js (which requires every file under lib/actions).
  • Replaces the three request() call sites in lib/actions/musicSearch.js with a small local httpGet helper built on Node's built-in fetch (Node 25). No new dependency.
  • Preserves the existing {url, json, headers} option shape so .then((res) => ...) chains remain behaviorally identical (res is text or parsed JSON, exactly as request-promise returned).

Test plan

  • node -e "require('./lib/actions/musicSearch.js'); console.log('require OK')" passes
  • node server.js boots, logs http server listening on 0.0.0.0 port 5005, no exceptions in log
  • GET /zones returns HTTP 200 with a zones array (live Sonos hardware present during test)

Note: request-promise is intentionally left in package.json as dead weight for a follow-up cleanup, per task instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

The request-promise dependency is pinned to ^0.0.1, a long-abandoned
package whose main field points to a missing lib/tp.js, causing
node server.js to crash at startup via require-dir. Replace the three
request() call sites with a small local httpGet helper built on Node's
built-in fetch, preserving the {url, json, headers} option shape so the
existing .then((res) => ...) chains remain behaviorally identical.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant