-
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
deno support for import assertions? #19850
Comments
Import Attributes (ex-Import Assertions) are Stage 3 now. We should wait for ECMAScript progress. related: #17944 |
Deno has supported import assertions and JSON modules since 1.17.0. (In fact, recently the import assertions proposal was renamed to import attributes and the The reason your import is failing seems to be because the JSON file you're importing isn't valid JSON syntax, but seems to be JS or TS. |
@ThaUnknown maybe you'll have an idea? |
my idea is that webtorrent doesn't support deno, as I've already told you once before |
it seems like the node compat doesn't support npm packages that have import assertion this fails the same way import b from "./b.json" assert { type: "json" };
console.log(b); |
Is it related to #17942 ? |
the popular webtorrent lib has lines like this:
when imported as
npm:webtorrent
this improt trips deno's compiler and a very cryptic hard to debug error message is output:is this feature supported in deno? why is the error message not with file and line numbers?
is there some solution to this?
thanks
Related #19834
The text was updated successfully, but these errors were encountered: