Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forced patch of Error.prepareStackTrace conflicts with other libraries #4258

Closed
doublerebel opened this issue Apr 24, 2016 · 3 comments
Closed
Labels

Comments

@doublerebel
Copy link

doublerebel commented Apr 24, 2016

Hello,

I've been running into issues related to node-source-map-support#34. source-map-support also monkey-patches Error.prepareStackTrace, and it would be great to have a CoffeeScript option to disable its patching.

In this particular case, I am using connect-assets to autocompile .coffee files for an express app. Although connect-assets's dep mincer only uses the coffee.compile() fn, the require("coffee-script") call still patches Error.prepareStackTrace.

I had to step through a lot of packages to find which package loaded in a way that was clobbering my prepareStackTrace.

I also recently solved this issue for node-vault, so it's not an isolated problem. I don't think it's clear enough to developers that require("coffee-script") will have this effect, I think having the option to disable it in the docs would help.

Thanks for your work, CoffeeScript is awesome!

@GeoffreyBooth
Copy link
Collaborator

@doublerebel per #4428 the patched version of Error.prepareStackTrace now only returns a modified stack trace for compiled CoffeeScript code, otherwise passing through the original runtime stack trace. Does this solve your issue?

We’re not looking to add any additional options to the CoffeeScript compiler.

@GeoffreyBooth
Copy link
Collaborator

@doublerebel is this still an issue?

@GeoffreyBooth
Copy link
Collaborator

If this is still an issue, please comment and I will reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants