dbamber/node-google-sql — Issue #1: TypeError: Cannot call method 'emit' of undefined 
Author: monaka
Created: 2011-12-15 13:39:36+00:00
State: open

I got an error when I run this script.

````JavaScript

var google = require('node-google-sql');

var user = process.argv[2];
var pass = process.argv[3];

google.login(user,pass, function () {
console.log('Logged in');
google.getTables(console.log);
});
````
````
node.js:178
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot call method 'emit' of undefined
at CleartextStream. (http.js:1195:9)
at CleartextStream.emit (events.js:64:17)
at Socket.onerror (tls.js:876:17)
at Socket.emit (events.js:64:17)
at Array. (net.js:822:27)
at EventEmitter._tickCallback (node.js:170:26)
````

The error is caused in getTables. This may be not caused by node-google-sql but http.js or somewhere.