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

Failed to import - types #862

Open
jamescqcampbell opened this issue Aug 13, 2024 · 5 comments
Open

Failed to import - types #862

jamescqcampbell opened this issue Aug 13, 2024 · 5 comments
Assignees
Labels
bug Something isn't working deno Not working in Deno types Types is wrong

Comments

@jamescqcampbell
Copy link

I've patched an npm module and would like to use my fork in deno. However, I have an issue where the type declarations generated by esm.sh do not seem to have a matching path as / is omitted for type definitions.

Is there a misconfiguration on my side?

Failing module type import - wrong namespace generated

import { retryAsync } from "https://esm.sh/gh/jamescqcampbell/[email protected]"

Module is exported correctly:

/* esm.sh - gh/jamescqcampbell/[email protected] */
export * from "/v135/gh/jamescqcampbell/[email protected]/es2022/ts-retry.mjs";

i.e.

 .../v135/gh/<username>/<package>@<version>/....

But type defs are then only exported at:

.../v135/gh/<package>@<version>/... 

Which then resolves to the wrong types in deno.

Additional info

  • esm.sh version: 135
@jamescqcampbell jamescqcampbell added the deno Not working in Deno label Aug 13, 2024
@ije
Copy link
Member

ije commented Aug 13, 2024

Screenshot 2024-08-13 at 15 52 17

i think it's a resoving bug of esm.sh, i will look into it

@ije
Copy link
Member

ije commented Aug 13, 2024

seems v136 works correctly, but it has not not been deployed yet

Screenshot 2024-08-13 at 15 59 45

@jamescqcampbell
Copy link
Author

@ije thanks so much for the quick response. I know that you're still working on v136 - do you know of a good workaround to use before that comes out?

@ije
Copy link
Member

ije commented Aug 13, 2024

i will add a fixpatch for v135 tmr

@ije ije self-assigned this Aug 13, 2024
@ije ije added bug Something isn't working types Types is wrong labels Aug 13, 2024
@jamescqcampbell
Copy link
Author

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deno Not working in Deno types Types is wrong
Projects
None yet
Development

No branches or pull requests

2 participants