We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Error: the promise constructor cannot be invoked directly.
You can get this error for several reasons:
####1. You forgot to use new when creating a new promise using new Promise(resolver) syntax.
new
new Promise(resolver)
This can happen when you tried to do something like:
return Promise(function(resolve,reject){ //... })
You can correct this by doing:
return new Promise(function(resolve,reject){ //... })
Please consider reading more about promisification and also consider checking out automatic promisification as well as Promise.method
Promise.method
####2. You are trying to subclass Promise
Promise
Bluebird does not support extending promises this way. Instead, see the Guide for Library Authors.