title: moment.isoWeekday is not a function
body: <p>I am using <code>codesandbox</code> and the same error keeps coming u: <code>502: bad gateway</code>. Looking on the terminal it's apparently because <code>moment.isoWeekday</code> is not a function. Why is this?</p>
  
  <p>I've looked on <code>moment.js</code> and the way I have put it in my code is apparently correct.</p>
  
  <pre><code>var http = require("http");
  var moment = require("moment");
  moment().format();
  
  function getDates() {
    var start = moment.utc("1st Jan 2019");
    var end = moment.utc("31st December 2019");
    var dates = [];
    var current = start.clone();
  
    if (current !== moment.isoWeekday(1)) {
      current = moment().add(1, "w");
    }
    while (current.isBefore(end)) {
      current.clone.push(dates);
      current = moment.add(2, "w");
    }
  
    return dates;
  }
  
  http
    .createServer(function(req, res) {
      res.writeHead(200, { "Content-Type": "text/plain" });
      res.write("day,date", "\n");
      var dates = getDates();
      for (var i = 0; i &lt; dates.length; i++) {
        res.write(moment.format("dddd, Do MMMM YYYY", dates[i]), "\n");
      }
      res.end();
    })
    .listen(8080);
  </code></pre>
  
  <p>I am doing a task of which I need to output dates. The <code>isoWeekday</code> is a part of the code which is supposed to check if the day is not <code>Monday</code>, then adds a week onto the variable so it sets to <code>Monday</code> the following week.</p>