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.

Source Maps w/ Browserify

See original GitHub issue

Currently can’t get source maps working correctly with Promise.method and Browserify.

var Promise = require('bluebird')
Promise.longStackTraces()
var foo = Promise.method(function() {
    throw new Error("BLAH")
    return 200
})

foo()

Stack trace:

Possibly unhandled Error: BLAH
    at http://localhost:8000/js/bundle.js:8:11
    at tryCatch1 (http://localhost:8000/js/bundle.js:5082:21)
    at Promise$_method (http://localhost:8000/js/bundle.js:2184:25)
    at Object../tests/cocoon-app.js.bluebird (http://localhost:8000/js/bundle.js:13:1)
    at s (http://localhost:8000/js/bundle.js:1:254)
    at e (http://localhost:8000/js/bundle.js:1:425)
    at http://localhost:8000/js/bundle.js:1:443 

The error source-maps correctly without the Promise.method wrapper. Noticing the same with Promise.promisify.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
stereokaicommented, May 16, 2017

Was this ever fixed? I’m having the same trouble with Bluebird v3.1.1

0reactions
zallekcommented, Oct 27, 2015

I have the same issue, I can’t make sourcemaps work, that’s make debugging such a pain … Bluebird is a nice library but I don’t get why it modifies the way unhandled errors are displayed …

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preserve original sourcemap with Browserify - Stack Overflow
browserify will not read source maps that reference another file, it will only use inlined source maps with inlined sources.
Read more >
Browserify with Sourcemaps | JimFrenette.com
Browserify with Sourcemaps ... Browserify lets you write modular JavaScript in node.js style. At the beginning of each module you write, the ...
Read more >
Readme - browserify - Read the Docs
This bundle works with other module systems and sets the name given as a ... --debug -d Enable source maps that allow you...
Read more >
gulp.js: babelify + browserify + sourcemaps · GitHub
gulp.js: babelify + browserify + sourcemaps. GitHub Gist: instantly share code, notes, and snippets.
Read more >
Browserify in Gulp with Correct Source Maps - Joshua Gleitze
A recipe to get correct paths in source maps when using browserify in gulp.
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