Browser installation

Download bluebird 3.7.2 (development)

Unminified source file meant to be used in development. Warnings and long stack traces are enabled which are taxing on performance.

<script src="//cdn.jsdelivr.net/npm/bluebird@3.7.2/js/browser/bluebird.js"></script>

Download bluebird 3.7.2 (production)

Minified source file meant to be used in production. Warnings and long straces are disabled. The gzipped size is 17.76KB.

<script src="//cdn.jsdelivr.net/npm/bluebird@3.7.2/js/browser/bluebird.min.js"></script>

Unless an AMD loader is installed, the script tag installation exposes the library in the Promise and P namespaces. If you want to restore the Promise namespace, use var Bluebird = Promise.noConflict().

Bower

$ bower install --save bluebird

Browserify and Webpack

$ npm install bluebird

Using webpack for development/debugging:

var Promise = require("bluebird");
// Configure webpack and browserify for development/debugging
Promise.config({
    longStackTraces: true,
    warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
})

Using webpack for production/performance:

var Promise = require("bluebird");
// Configure webpack and browserify for production/performance
Promise.config({
    longStackTraces: false,
    warnings: false
})

Node installation

$ npm install bluebird
var Promise = require("bluebird");

To enable long stack traces and warnings in node development:

$ NODE_ENV=development node server.js

To enable long stack traces and warnings in node production:

$ BLUEBIRD_DEBUG=1 node server.js

See Environment Variables.

Supported platforms

Bluebird officially supports and is tested on node.js, iojs and browsers starting from IE7. Unofficial platforms are supported with best effort only.

IE7 and IE8 do not support using keywords as property names, so if supporting these browsers is required you need to use the compatibility aliases:

Long stack traces are only supported in Chrome, recent Firefoxes and Internet Explorer 10+

Selenium Test Status