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

Better replacement algorithm for blob urls in stack traces. #30

Open
jespertheend opened this issue Nov 27, 2023 · 0 comments
Open

Better replacement algorithm for blob urls in stack traces. #30

jespertheend opened this issue Nov 27, 2023 · 0 comments

Comments

@jespertheend
Copy link
Owner

I just ran into an issue where a module tried to do

new URL("./some/path.js", import.meta.url);

Since import.meta.url was an object url, it threw an error:

TypeError: Invalid URL: '../some/path.js' with base 'file:///Users/Jesper/path/to/other/file.js'
const theUrl = new URL("../some/path.js", import.meta.url);
               ^
    at getSerialization (ext:deno_url/00_url.js:89:11)
    at new URL (ext:deno_url/00_url.js:380:27)
    at blob:null/7af13edf-0cac-4103-b56a-5129210edc73:100:16

This got me confused for a good while because the 'with base' reported a valid base.
Also it seems like the object url in the stack trace wasn't replaced for some reason.

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

1 participant