TypeError: Nexmo is not a constructor
See original GitHub issueUpgraded from 2.8.0 to 2.9.0 and now getting this error:
(node:45) UnhandledPromiseRejectionWarning: TypeError: Nexmo is not a constructor
at Object.<anonymous> (/app/services/myService.js:7:15)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/app/routes.js:4:21)
const Nexmo = require('nexmo');
const nexmo = new Nexmo({
apiKey: config.nexmo.apiKey,
apiSecret: config.nexmo.apiSecret
}, {
debug: false,
timeout: 60 * 1000
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
typings index.d.ts failing transpilation, needs an ts-ignore ...
Using @vonage/server-sdk with typescript doesn't transpile without an unrecommended bypass, but then it doesn't work at all.
Read more >DocStrap Source: nexmoClientError.js
NexmoClientError = NexmoClientError; /** * Error constructor of an API-error * @param ... errorInput); } else { // if the structure is not...
Read more >Vonage Server SDK for Node.js
Node.js Client for the Vonage API Platform. Latest version: 3.0.11, last published: 2 hours ago. Start using @vonage/server-sdk in your project by running ......
Read more >Getting TypeError: User is not a constructor when testing ...
Try: User.create({username}) should not need to do a . · with newUser. · show me the result of console. · It's { username:...
Read more >https://raw.githubusercontent.com/Nexmo/nexmo-node...
2.9.1 - FIXED: #317 - TypeError: Nexmo is not a constructor ## 2.9.0 - FIXED: #295 - Nexmo constructor changes of given options...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
v2.9.1 should have the issue resolved - let me know if you see anything else.
We have a fix for this coming shortly https://github.com/Nexmo/nexmo-node/pull/318
Thanks @mheap!