ノードのパラメーターを使用してnew --inspect、アプリケーションをデバッグしていますChrome Developer Tools。プロミスチェーンの最後に非常に基本的なものcatchがありますが、返されたエラーはどこから来たのかを明確に示していません。
エラーが発生したファイルを確認できますか?
leagues(app).getLeagues(passData)
.then(teamsApi.getNorsemenTeams)
.then(filterBarGamesIndex)
.then(gamesApi.getNorseGames)
.then(gamesApi.getFilteredTeams)
.then(function (passData) {
res.render('games', {
title: 'Results',
passData: passData,
type: req.originalUrl.split('/')[2]
})
})
.catch(function(err) {
console.error(err); //Line 35
});
}
コンソールから直接エラーは次のとおりです。
TypeError: Cannot read property 'Intermediate_Division_2' of undefined
at /var/www/beta.norsemanfc.co.uk/app/controllers/filterBar/fixturesIndex.js:27:62
at Array.filter (native)
at module.exports (/var/www/beta.norsemanfc.co.uk/app/controllers/filterBar/fixturesIndex.js:25:42)
at process._tickCallback (internal/process/next_tick.js:103:7)
