Cannot find module './auth.js' from 'node_modules/@vonage/auth/dist/cjs/index.cjs'

After updating @vonage/server-sdk to around 3.24.1 (with @vonage/auth 1.12.1), any import of the SDK fails with Cannot find module './auth.js' from 'node_modules/@vonage/auth/dist/cjs/index.cjs' (later reports show Cannot find module './errors/index.js'). Node 22, seen on Mac and in jest test suites. Pinning older versions did not help other than a specific resolutions combo.

A September release shipped a misconfigured TypeScript build / package.json exports map, so the ESM/CJS entry points referenced built files (e.g. ./auth.js) that were not emitted. Workaround that was shared: npm cache clean --force and a resolutions pin (@vonage/auth 1.12.0, @vonage/server-client 1.17.1, @vonage/jwt 1.11.0, @vonage/vetch 1.8.0, @vonage/conversations 1.9.3 alongside server-sdk 3.24.1). The permanent fix: upgrade @vonage/server-sdk to 3.25.0, where the build was migrated to tsup and exports were corrected. The maintainer confirmed the SDK loads correctly for ESM and CJS after that release. Source: https://github.com/Vonage/vonage-node-sdk/issues/1023

Source: https://github.com/Vonage/vonage-node-sdk/issues/1023