title: In q(promise), Cannot read property 'apply' of undefined?
body: <p>I try to use nodejs's q library, I use Q.fcall and then have the following error.</p>
  
  <pre><code>file_path/node_modules/q.js:155
              throw e;
              ^
  TypeError: Cannot read property 'apply' of undefined
  at Promise.apply (/Users/name/Desktop/Programming/video_tutorial_archive/node_modules/q/q.js:1185:25)
  at Promise.promise.promiseDispatch (/Users/name/Desktop/Programming/video_tutorial_archive/node_modules/q/q.js:808:41)
  at /Users/name/Desktop/Programming/video_tutorial_archive/node_modules/q/q.js:1411:14
  at runSingle (/Users/name/Desktop/Programming/video_tutorial_archive/node_modules/q/q.js:137:13)
  at flush (/Users/name/Desktop/Programming/video_tutorial_archive/node_modules/q/q.js:125:13)
  at _combinedTickCallback (internal/process/next_tick.js:73:7)
  at process._tickCallback (internal/process/next_tick.js:104:9)
  </code></pre>
  
  <p>The following is my code:</p>
  
  <pre><code>app.get('/',function(req,res){
  
  Q.fcall(sql_query.select_comment(con,comment))
  .then(function(){
  
      var deferred=Q.defer();
      con.query("SELECT * FROM "+table_video, function (err, result) {
          console.log("step 2 finished");
          console.log("comment is "+comment);
              // if (err) throw err;
              query_result=result;
              // deferred.resolve();
  
          // console.log(query_result);
      })
      // return deferred.promise;
  
  }).then(function(){
      console.log("step 3 finished");
      console.log("comment is "+comment);
      console.log(query_result);
  
      res.render('index',{
                  result:query_result,
                  comment:comment.comment
      });
  }).done();
  
  });
  </code></pre>
  
  <p>I can solve it with Q.defer, but I want to use fcall instead. It's cleaner, without all the deferred.promise, and deferred.resolve.</p>
  
  <p>What is causeing the error "Cannot read property 'apply' of undefined"? And how to fix it?</p>