amazon web services - AWS Node.js API error -
i'm using aws node.js api (aws-sdk
) version 1.0.0 on node version 0.11.2. error constructing 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' @ object.service (/.../node_modules/aws-sdk/lib/service.js:25:29) @ object.features.constructor [as s3] (/.../node_modules/aws-sdk/lib/util.js:405:24) @ readstream.<anonymous> (/.../server.js:92:22) @ readstream.eventemitter.emit (events.js:97:17) @ fs.js:1492:10 @ object.oncomplete (fs.js:94:15)
i same error node 0.8.23, 0.9.12 , 0.10.5 too.
i can't find reference error anywhere, doesn't happen else! doing wrong?
you have create new object s3 via new
:
var aws = require('aws-sdk'); aws.config.update({region: 'eu-west-1'}); var s3 = new aws.s3();
which should work without problem.
Comments
Post a Comment