Note that there are some explanatory texts on larger screens.

plurals
  1. POHas no method 'setMaxListeners' error
    primarykey
    data
    text
    <p>According to <a href="https://stackoverflow.com/questions/8313628/node-js-request-how-to-emitter-setmaxlisteners">this question here</a> I need to call <code>request.setMaxListeners(0)</code> to solve the problem described. </p> <p>When I try to do: </p> <pre><code>var request = require('request'); request.setMaxListeners(0); </code></pre> <p>I get the following error message: </p> <pre><code>request.setMaxListeners(0); ^ TypeError: Object function request(uri, options, callback) { if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.') if ((typeof options === 'function') &amp;&amp; !callback) callback = options if (options &amp;&amp; typeof options === 'object') { options.uri = uri } else if (typeof uri === 'string') { options = {uri:uri} } else { options = uri } options = copy(options) if (callback) options.callback = callback var r = new Request(options) return r } has no method 'setMaxListeners' at Object.&lt;anonymous&gt; (/home/vagrant/twitter/test.js:3:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:901:3 </code></pre> <p>How do I correctly adjust the default value for <code>setMaxListeners</code> when using the request-module?</p> <p><strong>node --version: 0.10.4</strong><br> <strong>request module version: 2.16.6</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload