question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bluebird Always Defaults to Debug Config w/ Webpack

See original GitHub issue
  1. What version of bluebird is the issue happening on? Bluebird 3.5.1

  2. What platform and version? Windows 10 64-bit Node v6.11.1 NPM 3.10.10

  3. Did this issue happen with earlier version of bluebird? At least as early as 3.4.x

When using Bluebird with Webpack 2.x/3.x, the JavaScript pulled in always comes from node_modules/bluebird/js/browser/bluebird.js. This originates from: https://github.com/petkaantonov/bluebird/blob/0da7d15c7241857fc2b853393fb8dd1ab3bbd5d7/src/debuggability.js#L21 But in bluebird’s unminified JS __DEBUG__ was replaced with a true when it was built. As a result, debugging will always default to true consequently enabling longStackTraces and other options which may be undesired by the developer.

A workaround for the problem is to explicitly pass debug options via Promise.config(), however if the developer does not specify all relevant options then they will all be enabled by default. A second workaround is to set the BLUEBIRD_DEBUG environment variable to 0. Both of these solutions contradict the defaults specified in the Bluebird API docs: http://bluebirdjs.com/docs/api/promise.config.html#promise.config

Created a repo to demonstrate: https://github.com/Cleod9/minimal-bluebird-webpack-debug-issue

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (5 by maintainers)

github_iconTop GitHub Comments

0reactions
Cleod9commented, May 27, 2019

The documentation update is much appreciated, thanks for the follow up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack/webpack - Gitter
I'm using the file-loader and it's making files with hashes in their name. ... I have a settings.js file that needs to be...
Read more >
Debugging | webpack
3.0+, developers can use the built-in --inspect flag to debug a node program in DevTools. This gives you the power to easily create...
Read more >
serverless-webpack-fixed - npm package - Snyk
By default the plugin will look for a webpack.config.js in the service directory. Alternatively, you can specify a different file or ...
Read more >
Serverless Webpack in Lambda Simplified 101 - Learn | Hevo
Sample code and function setup settings for the Node.js and Python run-times ... Version with promises // webpack.config.js const webpack ...
Read more >
cypress/webpack-preprocessor - npm.io
By default, this plugin (and all Cypress plugins) run in the Node version that is bundled with Cypress. Alternatively, you can use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found