-
Notifications
You must be signed in to change notification settings - Fork 623
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
Deno 1.9.0, Uncaught InvalidData: invalid url scheme #955
Comments
|
@lucacasonato I'd like to take this on. What do you think the error message here should be? I think, ideally, it should highlight that the |
Probably something along the lines of |
It seems like the old error message is still being used for this even in Deno 1.23.3. I ran into this when trying to use: import { create } from 'https://deno.land/x/deno_exif@0.0.2/mod.ts';
First few times I was reading this I wasn't even sure what this means. First I thought what even is a "file module"? And what is the case that is not working/supported then? Do I understand it correctly now that If so, this should definitely be clarified in the documentation (at least here and here). Basically any code that uses const require = createRequire(import.meta.url);
const something = require("./something"); does not work when imported via HTTP/HTTPS URLs. |
@Haprog Thanks for reporting. |
@kt3k Right, thanks for pointing that out. I did do some tests updating it locally to use latest version of std but I didn't realize to check the error message using that. Looks like with std@0.147.0 the error is:
which is slightly better I guess, but imo it's still not very clear (from the error) what is the issue in this kind of usage context. Should I open a new issue about improving the documentation (related to links to docs I posted above)? |
I have recently published a module: https://deno.land/x/fsquery/mod.ts
It works locally and at github actions.
Now I'm trying to test it:
Unfortunately, I have been receiving the error:
Here is a tricky point, which actually causes this error:
Update: I've changed the module declaration from CommonJS to ES6 module. The issue is resolved now, but still reproducible at the
fsquery@deno-module-0.1
version.The text was updated successfully, but these errors were encountered: