'Can't call method "promise" on an undefined value.'