-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Risk of accidentally registering both source-map-support and @cspotcode/source-map-support #1441
Risk of accidentally registering both source-map-support and @cspotcode/source-map-support #1441
Comments
Removing source-map-support should fix the issue, since We may also brainstorm ways to detect when both source-map-support libraries are loaded and somehow make them collaborate rather than interfere. Can we detect when Another option is for contributors to work with the source-map-support maintainers to merge all of the bugfixes and improvements from @cspotcode/source-map-support. Once that is done, we can switch back to using source-map-support. |
Another idea: We send a PR to We could also send a PR to |
Removing Also, seeing that https://github.com/evanw/node-source-map-support/commits/master last commit was almost 1y ago, the merge of the bug fixes doesn't seem like a solution in the short term. So if this could be handled by |
I took another look at source-map-support's hooking of node. It does 3x things: Sets
|
I suppose one problem with this approach: |
Since we already hook All the same, perhaps it is an acceptable solution? We are already forced to do some pretty hacky things. |
Yes, I was playing around with how to redirect the subsequent |
Oh right, redirecting the |
I want to log a warning when this happens, because that'll put pressure on maintainers to either fix |
I renamed this issue to more closely match the discussion. I've been trying to do that more often so that issues more clearly describe the work. |
Sure, I was about to change it as well. Got it working with the redirect, will open a PR on |
Search Terms
source map
10.2.0
Expected Behavior
Log should point to
example.ts:3
Actual Behavior
Log points to
example.ts:4
Steps to reproduce the problem
bash run.sh
Minimal reproduction
TypeStrong/ts-node-repros#17
Specifications
Additional context
I see that on https://github.com/TypeStrong/ts-node/releases/tag/v10.2.0 there was some changes to source map, probably causing this issue.
EDIT:
After reading #1440 & #1438, I see that this is issue is present due to using 2 different
source-map-support
libraries, however in this case it's a dependency (tslog
) using the originalsource-map-support
, how should users proceed in this case? I've confirmed that if I change the import in the dependency torequire("@cspotcode/source-map-support")
, it points to the correct line number, but that's not a practical solution.The text was updated successfully, but these errors were encountered: