-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
npm: import require of tslib fails, import_map does not help #18468
Comments
Had a quick peek at this and the issue is that the module isn't fetched at all. It's nowhere to be found on disk. The resolution logic itself seems to be correct and searches in all the right places. |
@marvinhagemeister that's a good pointer - my hunch is that |
The CJS analysis can be found in https://github.com/denoland/deno_ast/blob/main/src/cjs_parse.rs |
Maybe this can help explain what ts-results is doing in a non-typical way: vultix/ts-results#37 |
The issue is that ts-results does not specify You can work around this by telling deno to load the tslib package from the import map as well:
(Note that an import map is not a dependency manifest file, but rather a way to map specifiers, so you need an explicit side import to get it to be resolved and load) |
I will close this because this is very obviously a ts-results bug, see vultix/ts-results#38. |
npm package using require to get hold of tslib fails, making using that package impossible (without CDN hacks).
@kitsonk at #5427 (comment) thinks that using an import_map would help, but it doesn't:
Related issues: #5427 #17403 #17841 denoland/manual#147
The text was updated successfully, but these errors were encountered: