hasundue / molt

Update dependencies the Deno way
https://jsr.io/@molt
MIT License
79 stars 5 forks source link

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

Closed hasundue closed 4 months ago

hasundue commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

hasundue commented 6 months ago

Seems like a bug in the import_map crate. I created an issue and maybe working on it. https://github.com/denoland/import_map/issues/78

hasundue commented 4 months ago

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 commented 4 months ago

Should be fixed in 0.18.3