Immutable solution version
chargebee: Can't resolve 'http' after upgrading to Next.js 15 (fixed in v3.12.0)
Complete solution
Fixes the chargebee Node SDK failing with 'Can't resolve http' after upgrading to Next.js 15. Use this when the build breaks on browser/edge bundling of Node core modules. Not for other missing modules.
TL;DR: if upgrading from Next.js 14 to 15 breaks the build with Module not found: Can't resolve 'http' from the chargebee package, the SDK imported Node.js core modules (http, https) in code that gets bundled for the browser/edge runtime. Upgrade to chargebee v3.12.0 or newer (the fix landed first in 3.12.0-beta.1); 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.
Module not found: Can't resolve 'http'Steps
- Upgrade:
npm install chargebee@^3.12.0Rebuild.
Expected: the build completes. Success check: no more http resolve errors on Next 15 / edge.
When to use this
- Next.js 15 (upgraded or fresh) with the chargebee package.
When NOT to use this
- Other modules fail to resolve; check your imports.
- You are on 3.12.0+ and still see it; report it.
Compatibility
- chargebee v3.12.0+ with Next.js 15 / edge runtimes.
Variant phrasings
- "chargebee Can't resolve http nextjs 15"
- "chargebee node core modules browser"
Root cause
Node core imports leaked into browser-bundled code paths.
Edge cases
- None; the SDK fix is the whole story.
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 2 · 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>