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

Import map from a JSR specifier with path can't be resolved #146

Closed
hasundue opened this issue Mar 12, 2024 · 5 comments
Closed

Import map from a JSR specifier with path can't be resolved #146

hasundue opened this issue Mar 12, 2024 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hasundue
Copy link
Owner

For example, running molt CLI for a TS file

import { describe } from "@std/testing/bdd";

along with deno.json

{
  "imports": {
    "@std/testing": "jsr:@std/testing@0.210.0"
  }
}

results in the following error:

AssertionError: Expected actual: "undefined" to not be null or undefined.

Now being fixed in #145

@hasundue hasundue added the bug Something isn't working label Mar 12, 2024
@hasundue hasundue self-assigned this Mar 12, 2024
@hasundue
Copy link
Owner Author

You can workaround this by writing like

{
  "imports": {
    "@std/testing/bdd": "jsr:@std/testing@0.210.0/bdd"
  }
}

instead, but it's not as handy as the failing example.

@hasundue
Copy link
Owner Author

You can also avoid this error by running the CLI against deno.json directly.

@hasundue hasundue changed the title Import map for a JSR specifier with path can't be resolved Import map from a JSR specifier with path can't be resolved Mar 12, 2024
@hasundue hasundue moved this to Todo in Deno Mar 12, 2024
@hasundue hasundue moved this from Todo to In Progress in Deno Mar 12, 2024
@hasundue
Copy link
Owner Author

Seems like a bug in the import_map crate. I created an issue and maybe working on it.
denoland/import_map#78

@hasundue hasundue added this to the v1.0.0 milestone Apr 23, 2024
@hasundue hasundue pinned this issue May 6, 2024
@hasundue
Copy link
Owner Author

hasundue commented May 7, 2024

#166 introduced a tentative fix on this, which makes molt print warning messages and continue, rather than crushing with an unfriendly error.

I believe I can fix this in this week, so please be patient for the inconvenience.

@hasundue
Copy link
Owner Author

Should be fixed in 0.18.3

@github-project-automation github-project-automation bot moved this from In Progress to Done in Deno May 10, 2024
@hasundue hasundue unpinned this issue May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant