deno cache isn't working from vscode
When initializing a new fresh project from the cli script
deno run -A -r https://fresh.deno.dev
and opening it in vscode
no dependency can be cached and the deno extension output shows:
Import map diagnostics:
- Invalid top-level key "lint". Only "imports" and "scopes" can be present.
- Invalid top-level key "compilerOptions" ...
running deno cache **/*.ts
does work however.
running deno cache from vscode also shows
Error - 11:31:32] Request workspace/executeCommand failed.
Message: invalid length 0, expected tuple struct Arguments with 3 elements
Code: -326021 Reply
I wasn't able to find the answer to your question in the official Deno documentation. However, based on the error messages you've provided, it seems like there might be an issue with the import map configuration in your project.
The error message:
suggests that your import map might contain keys that are not recognized by Deno. The import map should only contain "imports" and "scopes" keys at the top level. If there are other keys like "lint" or "compilerOptions", they should be removed or corrected to match the expected format.
Regarding the
deno cache
command working in the CLI but not in VSCode, it could be related to how the Deno VSCode extension is configured or how it interacts with the workspace settings. Make sure that the Deno extension is properly configured and that the workspace settings are correct.
The error message:
indicates that there might be a problem with the arguments passed to a command in the VSCode extension. This could be a bug or a misconfiguration in the extension itself.
Please note that this advice is not based on the Deno documentation, and I would advise you to double-check the accuracy of the advice given. If the issue persists, you might want to reach out to the maintainers of the Deno extension for VSCode or seek help from the community for more specific guidance.