title: NodeJS to RabbitMQ: TypeError: Cannot read property 'createChannel' of undefined
body: <p>I keep encountering this error. My RabbitMQ works fine with my Python script but doesn't work with my NodeJS script. Here's the code snippet for reference:</p>
  
  <pre><code>const CONN_URL = 'amqp://&lt;username&gt;:&lt;password&gt;@&lt;ip_address&gt;:&lt;port&gt;/&lt;queue_name&gt;';
  var amqp  = require('amqplib/callback_api');
  amqp.connect(CONN_URL, function (err, conn) {
     conn.createChannel(function (err, channel) {
        ch = channel;
     });
  });
  </code></pre>
  
  <p>My connection from the client server to the RabbitMQ server is fine (tested thru Telnet) but it seems to not work with my NodeJS script. I tried googling but no solutions came up.</p>
  
  <p>Thanks!</p>