Closed cristian-spiescu closed 1 month ago
1.41.2
Is it fixed in the latest Deno version?
Deno Version: 1.46.3
I'm getting another error but also possibly because of JSR. I'm trying to import parseArgs from the @std/cli package to my file, but I'm getting an error for an uncached or missing remote URL.
I added @std/cli into the import map like usual, but when I write import { parseArgs } from "@std/cli";
, the error appears.
I don't know if this issue is related to yours, but I thought I'd reach out.
I'm trying to import parseArgs from the @std/cli package to my file, but I'm getting an error for an uncached or missing remote URL.
Click the Quick Fix...
button that appears in the image and click the cache dependency option. The error is saying that it doesn't have that dependency stored locally on the device so it is having trouble giving you information about it. Running the program once will also cache any missing dependencies, but I believe you can also do deno cache <file>
and it will cache any missing dependencies imported in said file.
Running the program once will also cache any missing dependencies
Thank you for the help. I'm somewhat new to TS/Deno and coding in VS Code, so I didn't know running the program would help the issue. Thanks again!
You have closed the issue. Unfortunately I still have the problem. Some hints would be appreciated. Thanks.
@cristian-spiescu What happens if you upgrade Deno to the latest (1.46.3)?
@cristian-spiescu is the .vscode folder in the root directory of your vscode project?
Version: Deno 1.41.2
It's only after the standard lib moved to JSR that I found out about the deno add command, and the "import maps" feature. Leveraging this,
deno.json
>imports
is somehow the equivalent ofpackage.json
>dependencies
.Before this, I was thinking that the pattern of
deps.ts
is the equivalent ofpackage.json
>dependencies
.However, I observe that in my case, VS Code doesn't recognize
deno.json
>imports
. I.e., I have this:But the IDE complains about this:
The program executes successfully. So Deno itself did recognize the import.
I tried various combination of
settings.json
:I also inspected
Output > Deno Language Server
, but nothing seemed suspect.Searching the Internet didn't gave much results. https://github.com/denoland/deno/issues/20210 seems a bit related, but the context there (i.e. a
deno.json
being in a subdir of the project) is not similar to mine.