Uncaught TypeError: undefined is not a promise

Viewed 18118
1 Answers

You need to instantiate the Promise.

In this case:

const p = new Promise((resolve, reject) => {
  resolve('ok')
})

p.then(resp => console.log(resp))

Related