IndicoDataSolutions / IndicoIo-node

A Node.js wrapper for the Indico API
MIT License
62 stars 7 forks source link

Node.js => Error: connect ECONNREFUSED #118

Closed n-lavrenko closed 8 years ago

n-lavrenko commented 8 years ago

Hi! I did'n know what the problem it may be cause it working on my machine yesterday. It's simple code from tutorial:

var indico = require('indico.io');
indico.apiKey =  'f92bd5647cc7536bf75518a3eebce323';

var response = function(res) { console.log(res); }
var logError = function(err) { console.log(err); }

// single example
indico.sentiment({data: 'I love writing code!'})
  .then(response)
  .catch(logError);

on response i receive:

{ [Error: connect ECONNREFUSED 104.197.152.141:80]
  cause:
   { [Error: connect ECONNREFUSED 104.197.152.141:80]
     code: 'ECONNREFUSED',
     errno: 'ECONNREFUSED',
     syscall: 'connect',
     address: '104.197.152.141',
     port: 80 },
  isOperational: true,
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '104.197.152.141',
  port: 80 }

I was tried to reinstall Node.js, tried version 6.3.1 and 4.4.7 of Node.js. Tried to send api call from PostMan - it works. But from node.js code - not working. Tried to debug - but nothing found yet.

screen shot 2016-08-14 at 05 02 18 screen shot 2016-08-14 at 05 20 55

Please, help me. Thanks.

sihrc commented 8 years ago

What version of this library are you currently using?

n-lavrenko commented 8 years ago

Latest version: 0.10.0 and also 0.9.5 Just try to reproduce this bug. Probably some changes on the indico.io backend occurred.

sihrc commented 8 years ago

Thanks @n-lavrenko for creating this issue. We've just deployed a fix in version 0.10.2. Sorry about that!

n-lavrenko commented 8 years ago

Thanks @sihrc! It's ok, each program contain the bug ;) Finally I can start developing!