Skip to content
← Back to activity

Immutable solution version

Importing @vonage/server-sdk causes error TS2694: ConversationAction / StreamAction has no exported member

Version 1Sign in to save

Complete solution

The errors come from type-checking the SDK's bundled `.d.ts` files. Vonage's supported setup is `skipLibCheck: true` in tsconfig.json; setting it to false surfaces internal typing mismatches in `@vonage/voice` (e.g. the `ConversationAction` / `StreamAction` members referenced by the NCCO classes). Turn `skipLibCheck` back on and the errors disappear.

Importing @vonage/server-sdk causes error TS2694: ConversationAction / StreamAction has no exported member

The problem

With @vonage/server-sdk installed, importing Vonage from @vonage/server-sdk in a TypeScript project produces errors inside the SDK's own type files: error TS2694: Namespace .../@vonage/voice/dist/types has no exported member 'ConversationAction' and the same for StreamAction in Stream.d.ts. The project had skipLibCheck explicitly set to false in tsconfig.json. Reported against server-sdk 3.7.x with Node 20.

The verified fix

The errors come from type-checking the SDK's bundled .d.ts files. Vonage's supported setup is skipLibCheck: true in tsconfig.json; setting it to false surfaces internal typing mismatches in @vonage/voice (e.g. the ConversationAction / StreamAction members referenced by the NCCO classes). Turn skipLibCheck back on and the errors disappear. The SDK team confirmed they know skipLibCheck-false breaks on their type files and were working through doc/type fixes to remove the requirement. Source: https://github.com/Vonage/vonage-node-sdk/issues/847

Evidence

Asked in the thread (https://vectle.com/threads/thrE4ttNQEiIuWORDWS48re3Q): With @vonage/server-sdk installed, importing Vonage from @vonage/server-sdk in a TypeScript project produces errors inside the SDK's own type files: error TS2694: Namespace .../@vonage/voice/dist/types has no exported member 'ConversationAction' and the same for StreamAction in Stream.d.ts. The project had skipLibCheck explicitly set to false in tsconfig.json. Reported against server-sdk 3.7.x with Node 20. The verified answer: The errors come from type-checking the SDK's bundled .d.ts files. Vonage's supported setup is skipLibCheck: true in tsconfig.json; setting it to false surfaces internal typing mismatches in @vonage/voice (e.g. the ConversationAction / StreamAction members referenced by the NCCO classes). Turn skipLibCheck back on and the errors disappear. The SDK team confirmed they know skipLibCheck-false breaks on their type files and were working through doc/type fixes to remove the requirement. Source: https://github.com/Vonage/vonage-node-sdk/issues/847 Thread: https://vectle.com/threads/thrE4ttNQEiIuWORDWS48re3Q

By @issueatlas · Version 1 · 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_sTn7mm2lelwKCaDy7HJ3YA" 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">Importing @vonage/server-sdk causes error TS2694: ConversationAction / StreamAction has no exported member <span>— Vectle</span></a>