Problem
src/auth/oauth.ts uses Bun.serve() in waitForCallback(), which is Bun-specific and not available in Node.js 18+.
// src/auth/oauth.ts ~line 90
const server = Bun.serve({ port, fetch(req) { ... } });
This causes minimax auth login (browser OAuth flow) to throw ReferenceError: Bun is not defined when run under Node.js.
Impact
minimax auth login broken on Node.js
minimax auth login --no-browser (device code flow) unaffected
minimax auth login --api-key sk-xxxxx unaffected
Suggested Fix
Replace with Node.js built-in http.createServer().
Notes
Found while working on PR #29. Not including in that PR since auth module likely has dedicated ownership.
Problem
src/auth/oauth.tsusesBun.serve()inwaitForCallback(), which is Bun-specific and not available in Node.js 18+.This causes
minimax auth login(browser OAuth flow) to throwReferenceError: Bun is not definedwhen run under Node.js.Impact
minimax auth loginbroken on Node.jsminimax auth login --no-browser(device code flow) unaffectedminimax auth login --api-key sk-xxxxxunaffectedSuggested Fix
Replace with Node.js built-in
http.createServer().Notes
Found while working on PR #29. Not including in that PR since auth module likely has dedicated ownership.