deno_std
deno_std copied to clipboard
Import errors in VS Code after switch to workspaces
Describe the bug
I am seeing import errors in VS Code in latest version of this repo after the move to workspaces. For example
"Relative import path "@std/io/types" not prefixed with / or ./ or ../ and not in import map from "file:///Users/XXX/workspace/deno_std/archive/tar.ts"deno(resolver-error)
I have Deno: future and Deno: unstable enabled.
Steps to Reproduce
- Open
archive/tar.tsin VS Code - See all imports from
@std/ioand@std/assertdisplay above error
Expected behavior
VSCode extension / LSP should resolve import via workspaces value in root deno.json and not display above import error
Environment
- OS: MacOS 14
- deno version: 1.43.1
- std version: 0.224.0
Does the LSP actually run with the above Deno version (1.43.1)?
What happens if you restart the language server? (via Cmd + Shift + P -> Deno: Restart Language Server)
Yep. LSP runs fine. Seeing this in output
Starting Deno language server...
version: 1.43.1 (release, aarch64-apple-darwin)
executable: /Users/XXX/.deno/bin/deno
Connected to "Visual Studio Code" 1.88.1
Hit the language server document preload limit of 1000 file system entries. You may want to use the "deno.enablePaths" configuration setting to only have Deno partially enable a workspace or increase the limit via "deno.documentPreloadLimit". In cases where Deno ends up using too much memory, you may want to lower the limit.
Refreshing configuration tree...
Resolved Deno configuration file: "file:///Users/XXX/workspace/deno_std/archive/deno.json"
Resolved lockfile: "file:///Users/XXX/workspace/deno_std/archive/deno.lock"
...
This is https://github.com/denoland/deno/issues/22694.
Thanks for the pointer, Nayeem. Let's track there. Closing this one