question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: self._handle.connect is not a function

See original GitHub issue
2016-04-07 11 22 05

Something went wrong on net module binding when using why-is-node-running with request+bluebird combo.

I got this error:

net.js:822
      err = self._handle.connect(req, address, port);
                         ^

TypeError: self._handle.connect is not a function
    at connect (net.js:822:26)
    at net.js:984:7
    at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:63:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82:10)

I tried to find the reason why it is fails, but i could’t find.

This is test code which i used.

'use strict';

/**
 * Module dependencies.
 */
const why         = require('why-is-node-running');

const
  Promise     = require('bluebird'),
  request     = require('request');


const
  feeds = [
    'http://www.gojobs.go.kr/employ/rss.asp',
    'https://github.com/mooyoul.atom',
    'https://github.com/Flexget/Flexget/commits/develop.atom'
  ];

const fetch = (url) => {
  return new Promise((resolve, reject) => {
    request({
      method: 'GET',
      url: url
    }, (e, res, body) => {
      if (e) {
        return reject(e);
      }

      resolve(body);
    });
  });
};

Promise.map(feeds, (feed, index) => {
  console.log('fetching feed index %d: %s', index, feed);
  return fetch(feed);
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:11
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
mafintoshcommented, May 6, 2016

I’ll try to find some time over the weekend to fix this. Thanks for reporting it 👍

2reactions
forivallcommented, Oct 4, 2016

I ran into this issue too, but https://github.com/myndzi/wtfnode was able to work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript error TypeError: "x" is not a function occurs when there is an attempt to call a function on a value or...
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
JavaScript error: "is not a function" - Stack Overflow
It was attempted to call a value like a function, but the value is not actually a function. Some code expects you to...
Read more >
Uncaught TypeError: self.on is not a function when trying to ...
I get an error when trying to connect to ES on AWS. Using this code supplied in the readme: var es = require('elasticsearch')....
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found