-
-
Notifications
You must be signed in to change notification settings - Fork 153
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 doesn't resolve transitive dependency #480
Comments
seems the CLI script not create correct imports, i will look into it! Thanks. {
"imports": {
"@hattip/router": "https://esm.sh/v102/*@hattip/[email protected]",
"@hattip/compose": "https://esm.sh/v102/@hattip/[email protected]",
"@hattip/core": "https://esm.sh/v102/@hattip/[email protected]"
} |
I've just encounter this too. The problem is that the scopes need to be listed as the resolved URLs. For example, if I do:
but Deno cannot resolve
The scope keys should be the resolved URLs like this...
which appears to work ok. |
You could also have a single scope for esm.sh if you want to align on the same version of each dep:
|
I've initialized a Deno project with the esm.sh CLI and I added the
@hattip/router
module withdeno task esm:add @hattip/router
. The import map looks like this after that:But trying to import
@hattip/router
gives the following error:I'm not well acquainted with esm.sh yet, am I supposed to
esm:add
transitive deps too (@hattip/compose
in this case) or is this a bug?The same happens with the browser and changing the scope from
@hattip/router
tohttps://esm.sh/v102/@hattip/[email protected]/
fixes it for both.The text was updated successfully, but these errors were encountered: