edasque / DynamoDBtoCSV

Dump DynamoDB data into a CSV file
Apache License 2.0
471 stars 152 forks source link

TypeError: undefined is not a function #2

Closed indapublic closed 10 years ago

indapublic commented 10 years ago

CentOS 6.5 64-bit. All pre-requisites installed.

[root@default DynamoDBtoCSV]# node dynamoDBtoCSV.js -t events_log_080414 > events_log_080414.csv

/var/www/html/DynamoDBtoCSV/dynamoDBtoCSV.js:4 var dynamoDB = new AWS.DynamoDB.Client(); ^ TypeError: undefined is not a function at Object. (/var/www/html/DynamoDBtoCSV/dynamoDBtoCSV.js:4:16) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3

edasque commented 10 years ago

I don't really have an environment to test this anymore but I am guessing the aws-sdk method signatures changed in 2.0 and we might require a pre-2.0 version? I would try installing a previous version, if I were you.

indapublic commented 10 years ago

Yeah, problem is solved by changing

var dynamoDB = new AWS.DynamoDB.Client();

to

var dynamoDB = new AWS.DynamoDB();
edasque commented 10 years ago

Feel free to submit a PR for this change?