title: Uncaught TypeError: <function> is not a function
body: <p>I am pretty new to Javascript and I've across an issue I can't seem to understand. The console is complaining saying it is not recognising the function.</p>
  
  <p>I have the following code (GraphActions.js):</p>
  
  <pre class="lang-js prettyprint-override"><code>var VentureDispatcher = require('../dispatcher/VentureDispatcher');
  var GraphStoreConstants = require('../constants/GraphStoreConstants');
  var StockService = require('../utils/StockService');
  
  var GraphActions = {};
  
    GraphActions.getGraphData = function(request){
      //have the API call here.
      VentureDispatcher.handleViewAction({
        actionType: GraphStoreConstants.GET_GRAPH_DATA,
        data: request
      });
      StockService.getHistoricStockData(request);
    };
  
    GraphActions.recieveGraphData = function(response){
      VentureDispatcher.handleServerAction({
        actionType: GraphStoreConstants.GRAPH_DATA_RESPONSE,
        response: response
      });
    };
  
    GraphActions.test = function(){
      console.debug("found this.");
    };
  
  module.exports = GraphActions;
  </code></pre>
  
  
  
  <p>And the following Javascript file which is calling the function within the code above:</p>
  
  <pre class="lang-js prettyprint-override"><code>var request = require('superagent');
  var GraphActions = require('../actions/GraphActions');
  
  var StockService = {
  
    getHistoricStockData: function(symbol){
        request.post('http://localhost:8080/historicalData')
               .send({
                          "symbol":"GOOG",
                          "from":"2016-06-01",
                          "to":"2016-07-01"
                      })
               .set('Content-Type','application/json')
               .end(function(err,res){
                 if(err || !res.ok){
                    console.error('Error making request!');
                 }else {
                    console.debug(JSON.stringify(res.body));
                    GraphActions.recieveGraphData(res.body);
                }
              });
    }
  };
  
  module.exports = StockService;
  </code></pre>
  
  
  
  <p>The console is throwing the following error and not too sure why:
  <strong>venture-stock.js:44673 Uncaught TypeError: GraphActions.recieveGraphData is not a function.</strong></p>
  
  <p>Does anyone understand why this is happening? The same method has been called in another place with no problem.</p>
  
  <p>When debugging the code and evaluating GraphAction object in the above code I get the following where the functions defined above are not available:</p>
  
  <p><a href="https://i.stack.imgur.com/zqeHa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zqeHa.png" alt="enter image description here"></a></p>
  
  <p>Where as in another location, the functions are available:</p>
  
  <p><a href="https://i.stack.imgur.com/Qn5NV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qn5NV.png" alt="enter image description here"></a></p>
  
  <p>Any help would be appreciated!</p>