You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux surajPC 4.2.0-36-generic rename node.js -> io.js #42~14.04.1-Ubuntu SMP Fri May 13 17:27:22 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux:
Subsystem:
I'm using the code below
//this code in fileA.jsvaraws=require('aws-sdk'),http=require('http'),fs=require('fs'),path=require('path'),express=require('express');varapp=newexpress();varconfig_path=path.join(__dirname,'../auth.json');aws.config.loadFromPath(config_path);vars3=newaws.S3();app.get('/buckets',function(req,res){s3.listBuckets(function(err,data){res.json(data);});});module.exports=app;//Then I call this module in another filevarapp=require('./fileA'),http=require('http');http.createServer(app).listen(3000,function(){console.log('Server listening on port 3000');});
Once I access the localhost:3000/buckets, I get the following error:
TypeError: Cannot read property 'length' of null
at Object.AWS.util.buffer.concat (/home/suraj/Desktop/server/node_modules/aws-sdk/lib/util.js:116:29)
at Request.HTTP_DONE (/home/suraj/Desktop/server/node_modules/aws-sdk/lib/event_listeners.js:214:36)
at Request.callListeners (/home/suraj/Desktop/server/node_modules/aws-sdk/lib/sequential_executor.js:132:20)
at Request.emit (/home/suraj/Desktop/server/node_modules/aws-sdk/lib/sequential_executor.js:100:10)
at Request.emitEvent (/home/suraj/Desktop/server/node_modules/aws-sdk/lib/request.js:408:10)
at IncomingMessage.onEnd (/home/suraj/Desktop/server/node_modules/aws-sdk/lib/event_listeners.js:184:26)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:926:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
I'm not sure if this has anything to do with the warning I get when I npm install aws -sdk
npm WARN amazons3@0.0.0 No repository field.
npm WARN amazons3@0.0.0 license should be a valid SPDX license expression
The text was updated successfully, but these errors were encountered:
sorry @skk2142, we can't do support for packages in npm here, you'll have to take your query over to the aws-sdk package: https://github.com/aws/aws-sdk-js
I'm using the code below
Once I access the localhost:3000/buckets, I get the following error:
I'm not sure if this has anything to do with the warning I get when I npm install aws -sdk
The text was updated successfully, but these errors were encountered: