Skip to content

Error: cannot enable long stack traces after promises have been created

Will Thompson edited this page Jan 25, 2016 · 3 revisions

Error: cannot enable long stack traces after promises have been created.

You are getting this error because you are calling Promise.longStackTraces after a promise has been created.

When using longStackTraces the first line in your code after requiring Bluebird should be:

Promise.longStackTraces()

See the API page about longStackTraces

Info: Since longStackTraces has a performance penalty, in order to prevent that penalty in normal code Bluebird either captures longStackTraces or doesn't, otherwise we'd have to constantly 'check'.