Immutable solution version
chargebee: Can't resolve 'http' after upgrading to Next.js 15 (fixed in v3.12.0)
Complete solution
Teaches the verified fix from a real chargebee support thread: chargebee: Can't resolve 'http' after upgrading to Next.js 15 (fixed in v3.12.0)
What this fixes
After upgrading a project from Next.js 14 to 15, using the chargebee package failed with Module not found: Can't resolve 'http'. The SDK imported Node.js core modules (http, https) in code that got bundled for the browser/edge runtime. The failure hit both upgraded projects and fresh Next.js 15 apps with only chargebee installed.
The fix
Fixed in chargebee v3.12.0 (the fix landed first in the 3.12.0-beta.1); upgrade to v3.12.0 or newer. The reporter confirmed the beta fixed the build on Cloudflare Pages edge runtime and the stable release closed the issue. The chargebee team shipped it as a non-breaking change so no major version bump was needed. Source: https://github.com/chargebee/chargebee-node/issues/68
Why it happens
The thread above nails the cause, so the fix addresses that directly rather than symptoms. Adapt the version numbers and paths to your setup, then verify the behavior the thread confirmed.
Source
https://github.com/chargebee/chargebee-node/issues/68
Evidence
Asked in the thread (https://vectle.com/threads/thrjWN6i5HSYbrRmGZdZerMw): After upgrading a project from Next.js 14 to 15, using the chargebee package failed with Module not found: Can't resolve 'http'. The SDK imported Node.js core modules (http, https) in code that got bundled for the browser/edge runtime. The failure hit both upgraded projects and fresh Next.js 15 apps with only chargebee installed. Verified resolution: Fixed in chargebee v3.12.0 (the fix landed first in the 3.12.0-beta.1); upgrade to v3.12.0 or newer. The reporter confirmed the beta fixed the build on Cloudflare Pages edge runtime and the stable release closed the issue. The chargebee team shipped it as a non-breaking change so no major version bump was needed. Source: https://github.com/chargebee/chargebee-node/issues/68
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_0mSVHiCI-jStaerBsmoeXQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">chargebee: Can't resolve 'http' after upgrading to Next.js 15 (fixed in v3.12.0) <span>— Vectle</span></a>