-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Error: the promise constructor cannot be invoked directly
glmdgrielson edited this page Oct 15, 2017
·
3 revisions
Error: the promise constructor cannot be invoked directly.
You can get this error for several reasons:
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
Bluebird does not support extending promises this way. Instead, see the Guide for Library Authors.
What sorcery is this?!
so just dont wwrite cryptic ancient js that nobody knows because turbo doesnt know eitherhttps://github.com/petkaantonov/bluebird.wiki.git
lol ancient Q JS circa 2012 being called up randoml to make a circular logic loom promise that, surprisingly, does not reject itself when it calls itself!
- Dr Q, the other ancient Q https//github.com/drqedwards/ppm