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

[Bug]: Babel/node got different results with node.js when using caller.js #9

Open
chlshown opened this issue Feb 14, 2022 · 1 comment

Comments

@chlshown
Copy link

Bug Detail: babel/babel#14254

and Babel team said: "I suggest opening an issue in that package's repository asking to support polyfilled error constructors."

@nicolo-ribaudo
Copy link

Note that this problem is not specific to Babel. Even if you don't use Babel, loading any Error polyfill causes this package to stop working. I suggest a replacing https://github.com/totherik/caller/blob/96474d00dd1090b99c0d71c8a9e1f74c24436011/index.js#L20-L21 with a loop that first finds the last frame whose file is __filename, and then subtracts the depth.

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

No branches or pull requests

2 participants