Stripe · sdk · fg-0151

Stripe.Customer and other namespace types vanish after upgrading stripe-node to v22 in a CommonJS project

TS2694: Namespace 'StripeConstructor' has no exported member 'Customer'

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

v22 moved the types inline with the code and turned the default export into a real ES class, which broke the CommonJS companion namespace. Patches landed in 22.0.1 for the constructor and 22.3.0 for nested type access.

Fix

Upgrade to 22.3.0 or later. Switching the project to ESM also restores the types.

Apply

npm install stripe@^22.3.0

Affects: stripe-node 22.0.0 to 22.2.x with TypeScript module commonjs; fixed in 22.3.0, 2026-06-24

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp