Using a vanilla node script like the following node async works just fine:
async = require('async');
async.waterfall([
function (c) {
console.log(1);
c(null);
},
function (c) {
console.log(2);
c(null);
}
]);
The above when run via node test.js prints out:
1
2
... as expected.
However if I place the code inside a node-lambda handler:
var async = require('async');
exports.handler = function( event, context ) {
console.log( "==================================");
async.waterfall([
function (c) {
console.log(1);
c(null);
},
function (c) {
console.log(2);
c(null);
}
]);
console.log( "==================================");
context.done( );
}
Only the first method is called when I run ./node_modules/.bin/node-lambda run
==================================
1
==================================
I'm using:
- async 1.5.2,
- node 5.5.0
- node-lambda 0.1.5