Automattic / knox

S3 Lib
MIT License
1.74k stars 285 forks source link

TypeError: Object.keys called on non-object #245

Closed benmarinic closed 10 years ago

benmarinic commented 10 years ago

I have just moved my node app to Amazon EC2 and have the following error when uploading with knox. I appear to have all of the libraries installed. The same code was OK on nodejitsu. Thanks.

/home/ec2-user/foo/node_modules/knox/lib/auth.js:208 Object.keys(url.query).forEach(function (key) { ^ TypeError: Object.keys called on non-object at Function.keys (native) at Object.exports.canonicalizeResource (/home/ec2-user/foo/node_modules/knox/lib/auth.js:208:10) at Client.request (/home/ec2-user/foo/node_modules/knox/lib/client.js:275:22) at Client.put (/home/ec2-user/foo/node_modules/knox/lib/client.js:326:15) at Client.putStream (/home/ec2-user/foo/node_modules/knox/lib/client.js:408:18) at /home/ec2-user/foo/node_modules/knox/lib/client.js:378:20 at Object.oncomplete (fs.js:93:15)

benmarinic commented 10 years ago

Turns out I was using a pre release version of Node. I reverted back to the current stable version and this issue went away.

snostorm commented 9 years ago

This was closed (due to it being in the unstable version) but it will probably be an issue again when node 0.11 officially becomes 0.12

domenic commented 9 years ago

This is already fixed in the Node 0.11 branch that will become 0.12.