これは私を夢中にしています。私は以下のコードを持っています。実行すると、私にはdebug-1
という印字しかありません。私が宣言した場所をコメントアウトすると、debug-1
とdebug-2
が印刷されます。NodeJSでpromiseを使用しているときにConsole.logが実行されていない
console.log('debug-1')
var where = {
compound_id: study.compound_id,
species: {
"like": (species + "*")
},
study_start: {
"<=": study.study_start
},
study_start: {
">=": threeYearsBeforeStudy
}
}
console.log('debug-2')
超特有です。私はこのブロックを約束の中に入れていますが、それは問題ではないはずです。
だから、なぜあなたはエラーを含んでいませんか? –
これは、なぜなら常に常にすべての人に '.catch'ハンドラを追加する必要があるからです。シングル。約束する。 –
'study'、' species'、 'threeYearsBeforeStudy'は宣言されていません。 –