Skip to content

fix(spotify): replace broken request-promise with native fetch#1

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

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

Conversation

@garrettwinder
Copy link
Copy Markdown
Owner

Summary

  • Replace request-promise (pinned to broken ^0.0.1) with Node's built-in fetch in lib/music_services/spotifyDef.js
  • Remove the now-unused getOptions helper
  • Simplify gratuitous new Promise wrapping in auth() and authenticateService()

Why

node server.js was crashing at startup because lib/helpers/require-dir.js loads every file under lib/actions at startup, and three files transitively required request-promise. That package's main field points to a missing lib/tp.js, so the require blew up the whole server. Node 25 has native fetch, so no new dependency is needed.

Test plan

  • Module loads clean with request-promise blocked: node -e "..." prints require OK without request-promise
  • Full server boot smoke test (deferred until sibling PRs for musicSearch.js and siriusXM.js land)

🤖 Generated with Claude Code

The request-promise package was pinned to ^0.0.1 (a long-abandoned
package whose main field points to a missing lib/tp.js), causing the
server to crash at startup when lib/helpers/require-dir.js transitively
loaded this file. Switch to Node's built-in fetch and simplify the
gratuitous Promise wrapping around auth() and authenticateService().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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