nodejs 事件的执行顺序

请问data,end,erro这些事件的执行顺序是什么?因为有的时候回触发两次的callback导致程序崩溃。
代码如下:

 const httpReq =  http.get(options, function(res) {
    res.on('data', function(data) {
      htmlData.push(data);
      htmlDataLength += data.length;
    });

    res.on('end',function(){
      parseHtmlTitle(function(){
        callback();
      });
    });

  });
  // 错误处理
  httpReq.on('error', function (err) {
    console.log (err);
    callback();
  });

data,end,erro。的顺序取决于options的路径返回值

http.get(url, function(res) {
res.url = url;
console.log(res.url);
})