-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
VS Code: "Not prefixed with... and not in import map from ..." #23835
Comments
Is the |
Yes, deno.json is at the root, and deno.json file works properly as it should. All the imports does the job properly, it's just VS Code that fails. You can take a look at the repo but it's private. Can I give you private access? |
Sure, can you invite @nayeemrmn and @nathanwhit? |
If you're using |
Also, try running |
Invited both Nathanwhit and Nayeermrmn. Also tried deno upgrade, it didn't change anything for me. |
@saeho I don't see anything wrong with it, it should work. What does the output panel say when you start the language server? Open it by clicking on the Deno part of the status bar at the bottom right. |
It says:
|
@saeho The project folder you're using there is above the one you gave us access to. What's the path of your project root? Are you using a multiroot workspace? Currently we don't have full support for monorepos with multiple If your project root is |
Path of the project is "file:///Users/saeho/Documents/apps/app-web/" and "file:///Users/saeho/Documents/apps/app-web/deno.json" is the correct path. And there is only 1 deno.json file. I changed the path name and changed it to "app-web" instead of "name" |
Can you clarify what multiroot workspace is? I'm using VS Code and i have 2 repos on the side so i can switch between 2 repos without changing VS Code tabs. But the 2 repos are separate and not connected in any way. |
Okay, yeah that's the issue. This is a multi-root workspace and they share a language server. Only the |
Okay, that explains it all then. Thank you. A future update for this feature would be greatly appreciated. |
Version: Deno 1.14.3
Hello,
I have a VS code issue where import-map configured NPM packages are showing as errors. I saw a few threads like this but none of the threads I read solved my problem (even though the issues were very similar.
Here's an example:
On the Server Deno repo
This will show as an error in VS Code ("not prefixed with / and not in import map from..."):
This is my deno.json:
However, this exact imports map works in my Fresh Deno app repo and VS Code does not complain.
The text was updated successfully, but these errors were encountered: