Why do I receive an error with this API request? Unexpected Token

53 views
Skip to first unread message

david tung

unread,
Dec 24, 2015, 1:12:07 AM12/24/15
to crunchbase-api
I am not entering my if (!error) statement, I know this because my console.log('in query') statement is not printing. Any ideas?

var fs= require('fs');
var request = require('request');
var cheerio = require('cheerio');
var app = express();
var crunchbase = require('crunchbase2');
var apikey='myapikey';

crunchbase.init(apikey);
console.log('after init');

crunchbase.people( {query: "1" }, function(error, results) {
  console.log('in .people');
    if (!error) {
      console.log('in query');
      console.log(results) // Print the search results                                              
  }
});
Reply all
Reply to author
Forward
0 new messages