Nexmo / nexmo-cli

Nexmo CLI (Command Line Interface)
https://nexmo.com
MIT License
78 stars 52 forks source link

nexmo balance returns error after upgrading node to v10.2.1 #160

Closed kyooryoo closed 6 years ago

kyooryoo commented 6 years ago

Steps to reproduce

Upgrade node to version 10.2.1 Upgrade nexmo-cli to latest version run "nexmo balance"

Expected behavior

return current balance value

Actual behavior

return current balance value and an error message: /usr/local/lib/node_modules/nexmo-cli/lib/response.js:53 this.emitter.log(Number(response.value.toFixed(2)) + 'EUR', response.value + ' EUR');

System configuration

Node version:10.2.1 NPM version: Operating system:

phukhanhlee commented 6 years ago

nexmo balance 500 EUR /usr/local/lib/node_modules/nexmo-cli/lib/response.js:53 this.emitter.log(Number(response.value.toFixed(2)) + ' EUR', response.value + ' EUR'); ^

TypeError: Cannot read property 'value' of undefined at Response.accountBalance (/usr/local/lib/node_modules/nexmo-cli/lib/response.js:53:40) at IncomingMessage. (/usr/local/lib/node_modules/nexmo-cli/node_modules/nexmo/lib/HttpClient.js:116:11) at IncomingMessage.emit (events.js:182:13) at TLSSocket.socketCloseListener (_http_client.js:346:11) at TLSSocket.emit (events.js:187:15) at _handle.close (net.js:596:12) at TCP.done [as _onclose] (_tls_wrap.js:383:7)

npm 5.6.0 node v10.2.1 mac OS

I think nexmo-cli doesn't test on new node version ? Please update lib

AlexLakatos commented 6 years ago

It seems there are a few issues with the latest node release. I'll take a look at it. Thanks for reporting this!

AlexLakatos commented 6 years ago

This is being fixed in #161 and released in v0.3.12