I'm using the AWS Node.js API (aws-sdk
) version 1.0.0 on Node version 0.11.2. I get an error simply constructing the API object:
var AWS = require('aws-sdk');
AWS.config.update({region: 'eu-west-1'});
var s3 = AWS.S3();
The error is:
/.../node_modules/aws-sdk/lib/service.js:25
var ServiceClass = this.loadServiceClass(config || {});
^
TypeError: Object #<Object> has no method 'loadServiceClass'
at Object.Service (/.../node_modules/aws-sdk/lib/service.js:25:29)
at Object.features.constructor [as S3] (/.../node_modules/aws-sdk/lib/util.js:405:24)
at ReadStream.<anonymous> (/.../server.js:92:22)
at ReadStream.EventEmitter.emit (events.js:97:17)
at fs.js:1492:10
at Object.oncomplete (fs.js:94:15)
I get the same error with Node 0.8.23, 0.9.12 and 0.10.5 too.
I can't find any reference to this error anywhere, so it obviously doesn't happen to anyone else! What am I doing wrong?