Vonage / vonage-node-sdk

Vonage API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Apache License 2.0
375 stars 178 forks source link

TypeError: Vonage is not a constructor #751

Closed tapz closed 1 year ago

tapz commented 1 year ago

V3 does not seem to work with CommonJS. Is this intentional?

Expected Behavior

No errors

Current Behavior

TypeError: Vonage is not a constructor

Possible Solution

Steps to Reproduce (for bugs)

const Vonage = require('@vonage/server-sdk');

new Vonage(
  {
    apiKey: '..',
    apiSecret: '...',
    applicationId: '...',
    privateKey: Buffer.from(...),
  }

Context

Your Environment

tapz commented 1 year ago

The api seems to have changed. Release notes would be nice...

const { Vonage } = require('@vonage/server-sdk');