Ok now modify it again to the below to figure out which of those steps is breaking. Like below:
async.waterfall([
async.apply(cacheStaticFiles),
async.apply(meta.themes.setupPaths),
function(next) {
console.log('1');
plugins.init(app, middleware, next);
},
function(next) {
console.log('2');
async.waterfall([
function (next) {
meta.templates.compile(function (err) {
console.log('2.compile');
next(err);
});
},
function (next) {
if (!skipJS) {
meta.js.minify('nodebb.min.js', function (err) {
console.log('2.b.minify');
next(err);
})
} else {
meta.js.getFromFile('nodebb.min.js', function (err) {
console.log('2.b.getFromFile');
next(err);
});
}
},
function (next) {
if (!skipJS) {
meta.js.minify('acp.min.js', function (err) {
console.log('2.b.minifyjs');
next(err);
})
} else {
meta.js.getFromFile('acp.min.js', function (err) {
console.log('2.b.getFromFilejs');
next(err);
});
}
},
function (next) {
if (!skipLess) {
meta.css.minify(function (err) {
console.log('2.b.minifycss');
next(err);
})
} else {
meta.css.getFromFile(function (err) {
console.log('2.b.getFromFileCss');
next(err);
});
}
},
function (next) {
meta.sounds.init(function (err) {
console.log('2.sounds');
next(err);
})
},
function (next) {
meta.sounds.init(function (err) {
console.log('2.blaclist');
next(err);
})
}
], next);
},
function(results, next) {
console.log('3');
plugins.fireHook('static:app.preload', {
app: app,
middleware: middleware
}, next);
},
function(next) {
console.log('4');
routes(app, middleware);
next();
}
], callback);
Sorry it's a bit long due to all the callbacks and error logging.