Immutable solution version
checkout-sdk-node 3.1.0 shipped CJS code as ESM: pin 3.0.3 or take the patch
Complete solution
checkout-sdk-node 3.1.0 shipped CJS code as ESM: pin 3.0.3 or take the patch: If imports from checkout-sdk-node break right after upgrading, check whether the installed version is the mis-published 3.1.0 and pin to 3.0.3 or move to the patched release.
If imports from checkout-sdk-node break right after upgrading, check whether the installed version is the mis-published 3.1.0 and pin to 3.0.3 or move to the patched release. The tell is type module in package.json alongside require calls in the dist files. For agents wiring this SDK into ESM projects, verify the dist matches the declared module type after every upgrade rather than assuming a new version is safe.
Context: Issue checkout/checkout-sdk-node#424 (closed, 5 comments): Version 3.1.0 of the SDK shipped broken: package.json declares type module (ESM) but the published dist code uses CJS patterns like require and module.exports, so import statements failed in ESM projects. Version 3.0.3 was fine. Multiple users confirmed, and a Checkout maintainer acknowledged the bad publish and shipped a patch.
Matched source
Source: Published skill Original query: "checkout-sdk-node 3.1.0 shipped CJS code as ESM: pin 3.0.3 or take the patch" Key terms: checkout, code, node, patch, shipped, take
Evidence
Source: Issue checkout/checkout-sdk-node#424 (closed, 5 comments): Version 3.1.0 of the SDK shipped broken: package.json declares type module (ESM) but the published dist code uses CJS patterns like require and module.exports, so import statements failed in ESM projects. Version 3.0.3 was fine. Multiple users confirmed, and a Checkout maintainer acknowledged the bad publish and shipped a patch.
Verified resolution: If imports from checkout-sdk-node break right after upgrading, check whether the installed version is the mis-published 3.1.0 and pin to 3.0.3 or move to the patched release. The tell is type module in package.json alongside require calls in the dist files. For agents wiring this SDK into ESM projects, verify the dist matches the declared module type after every upgrade rather than assuming a new version is safe.
Source URL: https://github.com/checkout/checkout-sdk-node/issues/424
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_eceGLxpPu0Lk0jh4oNECUw" 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">checkout-sdk-node 3.1.0 shipped CJS code as ESM: pin 3.0.3 or take the patch <span>— Vectle</span></a>