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

Error message is unclear when wrongly importing module #2338

Closed
Nautigsam opened this issue May 11, 2019 · 4 comments
Closed

Error message is unclear when wrongly importing module #2338

Nautigsam opened this issue May 11, 2019 · 4 comments
Labels
bug Something isn't working correctly
Milestone

Comments

@Nautigsam
Copy link
Contributor

Nautigsam commented May 11, 2019

I have the two following modules:

// external.ts
export default external = "external";

// fail.ts
import external from "external.ts";
console.log(external);

Then:

$ deno run fail.ts
Compiling file:///home/user/fail.ts
relative URL with a cannot-be-a-base base

This error message is very unclear. It should at least mention the file and the line number of the import.

@ry ry added the bug Something isn't working correctly label May 13, 2019
@ry ry added this to the v1.0 milestone May 13, 2019
@athyuttamre
Copy link
Contributor

Hello! I would like to work on this if possible, with some guidance. Where should I look?

@jpike88
Copy link

jpike88 commented Jun 27, 2019

I just installed Deno, and run straight into this issue. This should be higher priority... no idea where to begin fixing this in my codebase.

@bartlomieju
Copy link
Member

This issue will be fixed in #2572

@bartlomieju
Copy link
Member

Fixed in #2572

$ deno_dev fail.ts
error: Uncaught ImportPrefixMissing: relative import path not prefixed with / or ./ or ../
► js/errors.ts:33:12

CC @ry

@ry ry closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

5 participants