-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
triple slash references don't work in js files sometimes #22320
Comments
Do you have a lockfile? I think it's corrupt. Maybe try deleting it. Sorry, the error message is not very good here (I ran into it while debugging some stuff just now and searched the issue tracker) |
It happens regardless if there's a lock file. I found a workaround: if (false) {
import("npm:@types/[email protected]");
import("npm:[email protected]");
} |
You can not have more than one triple slash reference comment in a JS file. Only one is supported, and it's types will be used as the types of the JS file. |
That's not just a docs issue. The error message could be better and it shouldn't crash Deno. |
Looks like triple slash references to remote modules don't work when there's at least 2 of them in a project:
VSCode says:
deno check
crashes:Importing from esm.sh also doesn't work:
Now the last one only gets types and the rest are ignored:
This only happens in
js
files.ts
works fine.Version: Deno 1.40.3
The text was updated successfully, but these errors were encountered: